/* ═══════════════════════════════════════════════════════════════
 * novel_backup/style.css
 * 소설/장문 백업용 스킨 — 대사는 말풍선, 서술문은 소설체 문단
 * 폰트는 별도로 지정하지 않고 사이트 기본 폰트를 그대로 상속받습니다.
 * ═══════════════════════════════════════════════════════════════ */

/* ─── 목록 ─── */
.nvl-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--hair);
}
.nvl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 6px;
  border-bottom: 1px solid var(--hair-soft);
  text-decoration: none;
  color: inherit;
  transition: background .12s;
}
.nvl-row:hover {
  background: var(--paper-2);
}
.nvl-row-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.nvl-row-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nvl-row-subtitle {
  font-size: 13px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nvl-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.nvl-row-date {
  font-size: 12px;
  color: var(--ink-mute);
}
.nvl-lock {
  font-size: 11px;
  opacity: .6;
}

/* ─── 상세: 카드형 배경 상자 ─── */
.nvl-view {
  background: var(--paper, #fff);
  border-radius: 20px;
  border: 1px solid var(--hair-soft, rgba(0,0,0,.06));
  padding: 32px 28px;
}

/* ─── 상세: 헤더 ─── */
.nvl-view-head {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--hair-soft, rgba(0,0,0,.08));
}
.nvl-view-head h1 {
  font-size: 24px;
  font-weight: 800;
  margin: 10px 0 0;
  color: var(--ink);
  line-height: 1.4;
}
.nvl-subtitle {
  font-size: 15px;
  color: var(--ink-soft);
  margin-top: 8px;
}
.nvl-meta {
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 14px;
}
.nvl-images {
  margin-bottom: 28px;
}
.nvl-images img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 8px;
}

/* ─── 본문 ─── */
.nvl-body {
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink, #222);
}

/* 서술문 문단 */
.nvl-body p {
  margin: 0 0 22px;
  text-indent: 1em;
  word-break: keep-word;
}
.nvl-body p:last-child {
  margin-bottom: 0;
}

/* 대사 한 마디 = 이름표 + 말풍선을 감싸는 줄 */
.nvl-msg {
  display: flex;
  flex-direction: column;
  margin: 0 0 22px;
  text-indent: 0;
}
.nvl-msg-left {
  align-items: flex-start;
}
.nvl-msg-right {
  align-items: flex-end;
}

/* 화자 이름표 */
.nvl-msg-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-mute, #888);
  margin: 0 4px 4px;
}

/* 말풍선 공통 */
.nvl-bubble {
  position: relative;
  display: inline-block;
  max-width: 78%;
  padding: 12px 18px;
  font-size: 13px;
  line-height: 1.6;
}

/* 대사(말풍선) — 왼쪽: 연한 회색조, 오른쪽: 강조색 */
.nvl-msg-left .nvl-bubble-speech {
  background: var(--paper-2, #f2f1ea);
  color: var(--ink, #222);
  border: 1px solid var(--hair-soft, rgba(0,0,0,.08));
  border-radius: 4px 16px 16px 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.nvl-msg-left .nvl-bubble-speech::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 2px;
  width: 14px;
  height: 14px;
  background: var(--paper-2, #f2f1ea);
  border-left: 1px solid var(--hair-soft, rgba(0,0,0,.08));
  border-top: 1px solid var(--hair-soft, rgba(0,0,0,.08));
  border-radius: 12px 0 0 0;
}

.nvl-msg-right .nvl-bubble-speech {
  background: var(--accent-soft, #eaf0ff);
  color: var(--ink, #222);
  border: 1px solid var(--hair-soft, rgba(0,0,0,.08));
  border-radius: 16px 4px 16px 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.nvl-msg-right .nvl-bubble-speech::before {
  content: "";
  position: absolute;
  right: -6px;
  top: 2px;
  width: 14px;
  height: 14px;
  background: var(--accent-soft, #eaf0ff);
  border-right: 1px solid var(--hair-soft, rgba(0,0,0,.08));
  border-top: 1px solid var(--hair-soft, rgba(0,0,0,.08));
  border-radius: 0 12px 0 0;
}

/* 대사 뒤에 이어지는 서술문과의 간격 정리 */
.nvl-body .nvl-msg + p {
  margin-top: -6px;
}

/* ─── 제목 ─── */
.nvl-heading {
  text-indent: 0;
  font-weight: 800;
  color: var(--ink, #222);
  margin: 28px 0 14px;
  line-height: 1.4;
}
.nvl-h1 { font-size: 22px; }
.nvl-h2 { font-size: 19px; }
.nvl-h3 { font-size: 16px; }

/* ─── 정렬 지정 문단 (에디터의 가운데/우측/양쪽 정렬) ─── */
.nvl-body p.nvl-aligned {
  text-indent: 0;
}

/* ─── 목록 ─── */
.nvl-body ul.nvl-list-ul,
.nvl-body ol.nvl-list-ol {
  margin: 0 0 22px;
  padding-left: 1.4em;
}
.nvl-body ul.nvl-list-ul li,
.nvl-body ol.nvl-list-ol li {
  margin-bottom: 6px;
  line-height: 1.7;
}

/* ─── 인용구 ─── */
.nvl-quote {
  margin: 0 0 22px;
  padding: 10px 16px;
  border-left: 3px solid var(--hair-soft, rgba(0,0,0,.15));
  color: var(--ink-soft, #666);
  font-style: italic;
}

/* ─── 구분선 ─── */
.nvl-hr {
  border: none;
  border-top: 1px solid var(--hair-soft, rgba(0,0,0,.12));
  margin: 28px 0;
}

/* ─── 코드 블록 ─── */
.nvl-code {
  margin: 0 0 22px;
  padding: 14px 16px;
  background: var(--paper-2, #f2f1ea);
  border: 1px solid var(--hair-soft, rgba(0,0,0,.08));
  border-radius: 8px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ─── 블러(스포일러) — 클릭하면 보임 ─── */
.nvl-blur {
  filter: blur(6px);
  cursor: pointer;
  transition: filter .15s;
  user-select: none;
}
.nvl-blur.nvl-blur-open {
  filter: none;
  user-select: text;
}

/* ─── 접기 ─── */
.nvl-fold {
  margin: 0 0 18px;
  border: 1px solid var(--hair-soft, rgba(0,0,0,.1));
  border-radius: 8px;
  padding: 10px 14px;
}
.nvl-fold summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink, #222);
}
.nvl-fold-body {
  margin-top: 8px;
  color: var(--ink-soft, #555);
}

/* ─── 루비(발음 표기) ─── */
.nvl-body ruby {
  ruby-position: over;
}
.nvl-body rt {
  font-size: 10px;
  color: var(--ink-mute, #888);
}

/* ─── 반응형 ─── */
@media (max-width: 520px) {
  .nvl-body { font-size: 14.5px; }
  .nvl-bubble { max-width: 88%; font-size: 12.5px; }
}
