/* 후기 게시판 — 라벤더 크림 팔레트(style.css 의 변수)를 그대로 쓴다. 포인트 색은 보라 하나. */

.reviews-root { padding-bottom: 40px; }
.reviews-root .section-header-row p { margin: 6px 0 0; color: var(--text-muted); }

body.rv-lock { overflow: hidden; }

/* 로그인 안내 */
.rv-notice {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 12px 16px; margin-bottom: 18px;
    background: var(--primary-soft); border-radius: 14px; color: var(--text-main);
    font-size: 0.92rem;
}
.rv-notice i { color: var(--primary); font-size: 1.2rem; }
.rv-notice span { flex: 1; min-width: 200px; }
.rv-notice .btn { padding: 8px 16px; }

/* 관리자 요약 */
.rv-admin {
    background: #fff; border: 1px dashed rgba(107, 79, 160, 0.4); border-radius: 18px;
    padding: 18px 20px; margin-bottom: 22px;
}
.rv-admin-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.rv-admin-top h3 { margin: 0; font-size: 1.02rem; color: var(--primary-dark); }
.rv-admin-top h3 small { font-weight: 500; color: var(--text-muted); font-size: 0.78rem; margin-left: 6px; }
.rv-import-btn { padding: 8px 14px; font-size: 0.85rem; }
.rv-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.rv-stats div { background: var(--bg-dark); border-radius: 12px; padding: 12px 8px; text-align: center; }
.rv-stats b { display: block; font-size: 1.4rem; color: var(--primary-dark); }
.rv-stats span { font-size: 0.78rem; color: var(--text-muted); }
.rv-rank { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.rv-rank li {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px;
    background: var(--bg-dark); cursor: pointer; font-size: 0.9rem;
}
.rv-rank li:hover { background: var(--primary-soft); }
.rv-rank-n { width: 24px; height: 24px; border-radius: 50%; background: var(--primary-gradient); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0.78rem; font-weight: 700; flex-shrink: 0; }
.rv-rank-who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-rank-who small { color: var(--text-muted); margin-left: 4px; }
.rv-rank-num { color: var(--text-muted); font-size: 0.82rem; white-space: nowrap; }

/* 도구줄 */
.rv-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.rv-toolbar .work-chip-bar { margin-bottom: 0; }
.rv-sort { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
.rv-sort select {
    padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 10px;
    background: #fff; color: var(--text-main); font-family: inherit; font-size: 0.88rem;
}

/* 카드 목록 */
.rv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.rv-card {
    position: relative; background: #fff; border: 1px solid var(--border-color); border-radius: 18px;
    padding: 18px; display: flex; flex-direction: column; gap: 12px;
    box-shadow: var(--shadow-premium); transition: var(--transition-smooth);
}
.rv-card:hover { border-color: var(--border-hover); }
.rv-card.featured { border-color: #e2b25c; background: linear-gradient(180deg, #fffaf0 0%, #fff 60%); }
.rv-best, .rv-best-inline {
    display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
    background: var(--accent-peach); color: var(--accent-peach-deep);
    font-size: 0.78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.rv-head, .rv-d-head { display: flex; align-items: center; gap: 10px; }
.rv-d-head { justify-content: space-between; margin-bottom: 14px; }
.rv-d-head .rv-who { flex: 1; min-width: 0; }
.rv-avatar {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    background: var(--primary-soft); color: var(--primary-dark);
    display: inline-flex; align-items: center; justify-content: center; font-weight: 800;
}
.rv-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rv-who b { font-size: 0.95rem; color: var(--text-main); }
.rv-who small { color: var(--text-muted); font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-owner { display: inline-flex; gap: 6px; flex-shrink: 0; }

.rv-open { cursor: pointer; display: flex; flex-direction: column; gap: 10px; border-radius: 10px; }
.rv-open:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.rv-title { margin: 0; font-size: 1.05rem; color: var(--text-main); line-height: 1.4; }
.rv-body {
    margin: 0; color: var(--text-main); line-height: 1.65; font-size: 0.94rem; white-space: pre-wrap; word-break: break-word;
    display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}

/* 사진·영상 미리보기 */
.rv-thumbs { display: grid; gap: 6px; }
.rv-thumbs-1 { grid-template-columns: 1fr; }
.rv-thumbs-2 { grid-template-columns: 1fr 1fr; }
.rv-thumbs-3 { grid-template-columns: 1fr 1fr 1fr; }
.rv-thumb { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: var(--primary-soft); }
.rv-thumbs-1 .rv-thumb { aspect-ratio: 16 / 10; }
.rv-thumb img, .rv-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-play {
    position: absolute; left: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 50%;
    background: rgba(46, 36, 69, 0.7); color: #fff; font-size: 0.7rem;
    display: inline-flex; align-items: center; justify-content: center; padding-left: 2px;
}
.rv-more {
    position: absolute; inset: 0; background: rgba(46, 36, 69, 0.55); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 800;
}

/* 블로그·카페 링크 카드 */
.rv-link {
    display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-dark);
    text-decoration: none; color: var(--text-main); transition: var(--transition-smooth);
}
.rv-link:hover { border-color: var(--border-hover); background: var(--primary-soft); }
.rv-link-icon { font-size: 1.35rem; width: 28px; text-align: center; flex-shrink: 0; }
.rv-link-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rv-link-text b { font-size: 0.9rem; }
.rv-link-text small { color: var(--text-muted); font-size: 0.76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-link-go { color: var(--text-muted); font-size: 0.8rem; }
.rv-embed { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.rv-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 이모티콘 반응 */
.rv-reactions { display: flex; flex-wrap: wrap; gap: 6px; }
.rv-react {
    display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px;
    border: 1px solid var(--border-color); background: #fff; color: var(--text-muted);
    font-family: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; transition: var(--transition-smooth);
}
.rv-react:hover { border-color: var(--border-hover); transform: translateY(-1px); }
.rv-react.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.rv-emoji { font-size: 1.05rem; line-height: 1; }
.rv-count:empty { display: none; }

/* 관리자 줄 */
.rv-admin-row { display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px dashed var(--border-color); }
.rv-views { font-size: 0.85rem; font-weight: 700; color: var(--primary-dark); background: var(--primary-soft); padding: 4px 10px; border-radius: 999px; }

.rv-tag-guest { font-size: 0.74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #e9f4ee; color: #2f7d5c; }
.rv-contact { font-size: 0.8rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.rv-admin-row { flex-wrap: wrap; }
/* 자동 등록 방지용 숨은 칸: 화면 밖으로 치워 사람은 볼 수 없고 프로그램만 채운다 */
.rv-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.rv-mini {
    display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 8px;
    border: 1px solid var(--border-color); background: #fff; color: var(--text-muted);
    font-family: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer;
}
.rv-mini:hover { border-color: var(--border-hover); color: var(--text-main); }
.rv-mini.on { background: var(--accent-peach); color: var(--accent-peach-deep); border-color: transparent; }
.rv-mini.danger:hover { border-color: var(--accent-red); color: var(--accent-red); }

.rv-empty { text-align: center; padding: 50px 20px; color: var(--text-muted); background: #fff; border: 1px dashed var(--border-color); border-radius: 16px; }
.rv-more-wrap { text-align: center; margin-top: 20px; }

/* 겹창 (자세히 보기 · 쓰기 · 가져오기) */
.rv-overlay {
    position: fixed; inset: 0; z-index: 950; background: rgba(46, 36, 69, 0.55);
    display: flex; align-items: center; justify-content: center; padding: 16px;
    opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.rv-overlay.active { opacity: 1; pointer-events: auto; }
.rv-dialog {
    background: #fff; width: 100%; max-width: 680px; max-height: 92vh; overflow-y: auto;
    border-radius: 22px; padding: 24px; box-shadow: 0 25px 50px -12px rgba(46, 36, 69, 0.35);
}
.rv-form-dialog { max-width: 600px; }
.rv-import-dialog { max-width: 760px; }
.rv-close {
    width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--bg-dark);
    color: var(--text-muted); cursor: pointer; flex-shrink: 0;
}
.rv-close:hover { background: var(--primary-soft); color: var(--primary-dark); }
.rv-d-body { margin: 12px 0; line-height: 1.8; white-space: pre-wrap; word-break: break-word; color: var(--text-main); }
.rv-d-media { display: grid; gap: 10px; margin: 14px 0; }
.rv-d-img { width: 100%; max-height: 520px; object-fit: contain; border-radius: 12px; background: var(--bg-dark); cursor: zoom-in; }
.rv-d-video { width: 100%; max-height: 520px; border-radius: 12px; background: #000; }
.rv-dialog .rv-link, .rv-dialog .rv-embed { margin: 10px 0; }
.rv-dialog .rv-reactions { margin-top: 14px; }
.rv-dialog .rv-admin-row { margin-top: 14px; }
.rv-d-actions { margin-top: 14px; display: flex; justify-content: flex-end; }

/* 쓰기 폼 */
.rv-f-field { margin-bottom: 16px; }
.rv-f-field > label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; color: var(--text-main); }
.rv-f-field small { font-weight: 500; color: var(--text-muted); }
.rv-f-field input[type="text"], .rv-f-field input[type="url"], .rv-f-field select, .rv-f-field textarea {
    width: 100%; box-sizing: border-box; padding: 11px 13px; border: 1px solid var(--border-color); border-radius: 12px;
    background: #fff; color: var(--text-main); font-family: inherit; font-size: 0.95rem;
}
.rv-f-field textarea { resize: vertical; line-height: 1.6; }
.rv-f-field input:focus, .rv-f-field select:focus, .rv-f-field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(107, 79, 160, 0.12); }
.rv-custom-course { margin-top: 8px; }
.rv-f-media { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.rv-f-media:empty { display: none; }
.rv-f-item { position: relative; width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: var(--primary-soft); }
.rv-f-item img, .rv-f-item video { width: 100%; height: 100%; object-fit: cover; }
.rv-f-rm {
    position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: none;
    background: rgba(46, 36, 69, 0.75); color: #fff; font-size: 0.7rem; cursor: pointer;
}
.rv-f-field > label.rv-pick { display: inline-flex; width: auto; margin: 0; font-weight: 600; cursor: pointer; padding: 10px 16px; font-size: 0.88rem; }
.rv-f-status { margin-left: 10px; color: var(--primary); font-size: 0.85rem; font-weight: 600; }
.rv-hint { margin: 8px 0 0; color: var(--text-muted); font-size: 0.8rem; line-height: 1.5; }
.rv-link-row { display: flex; gap: 6px; margin-bottom: 6px; }
.rv-link-row input { flex: 1; min-width: 0; }
.rv-f-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.rv-f-actions .rv-hint { margin: 0 auto 0 0; }

/* 가져오기 */
.rv-warn {
    display: flex; gap: 10px; padding: 12px 14px; margin: 12px 0; border-radius: 12px;
    background: #fff4e5; color: #8a5a1c; font-size: 0.86rem; line-height: 1.55;
}
.rv-warn b { white-space: nowrap; }
.rv-i-filters { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
.rv-i-filters select, .rv-i-filters input { margin-left: 6px; padding: 6px 10px; border: 1px solid var(--border-color); border-radius: 8px; font-family: inherit; }
.rv-i-filters input { width: 70px; }
.rv-i-list { max-height: 46vh; overflow-y: auto; border: 1px solid var(--border-color); border-radius: 12px; }
.rv-i-row { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border-color); cursor: pointer; align-items: flex-start; }
.rv-i-row:last-child { border-bottom: none; }
.rv-i-row:hover { background: var(--bg-dark); }
.rv-i-row.done { opacity: 0.5; cursor: default; }
.rv-i-row input { margin-top: 4px; }
.rv-i-text { flex: 1; min-width: 0; font-size: 0.9rem; }
.rv-i-text small { color: var(--text-muted); margin-left: 4px; }
.rv-i-body { display: block; margin-top: 4px; color: var(--text-main); line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.rv-tag { font-style: normal; font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-left: 6px; background: var(--primary-soft); color: var(--primary-dark); }
.rv-tag.gated { background: #fde7e7; color: #b3382c; }

@media (max-width: 760px) {
    .rv-grid { grid-template-columns: minmax(0, 1fr); }
    .rv-head { flex-wrap: wrap; }
    .rv-owner { margin-left: 48px; }
    .rv-stats { grid-template-columns: repeat(2, 1fr); }
    .rv-dialog { padding: 18px; border-radius: 18px; }
    .rv-overlay { padding: 10px; align-items: flex-end; }
    .rv-toolbar { align-items: stretch; }
}
