:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-2: #eef3ef;
  --ink: #17201b;
  --muted: #657066;
  --line: #d9dfd9;
  --green: #2f7658;
  --green-dark: #1d5e43;
  --blue: #346a9f;
  --amber: #b46a22;
  --red: #b43d38;
  --violet: #6954a8;
  --shadow: 0 18px 45px rgba(23, 32, 27, 0.1);
  --radius: 8px;
  --jubo-gray: #d9d9d9;
  --jubo-lav: #ccccef;
  --jubo-font: "Malgun Gothic", "맑은 고딕", "Noto Sans KR", sans-serif;
}

/* ===== 다크 테마 (Bgent_B2BMall tokens.css 팔레트 미러링) =====
 * 앱 전반이 CSS 변수로 그려져 변수만 덮으면 대부분 전환된다.
 * 단, 예배 슬라이드(.ppt-slide 라이트 테마)는 실제 투사용이라 밝게 유지한다. */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #1f2733;
  --ink: #e8edf2;
  --muted: #9aa4b0;
  --line: #2b333d;
  /* 다크 테마 강조색: 초록 → 남색·인디고 (밝은 테마는 그대로 초록 유지) */
  --green: #5b7bc9;
  --green-dark: #3d5a99;
  --blue: #58a6ff;
  --amber: #e0a24a;
  --red: #f0625d;
  --violet: #a897e6;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
  --jubo-gray: #3a3f45;
  --jubo-lav: #3b3560;
}

[data-theme="dark"] .topnav {
  background: #0b0f14;
}

[data-theme="dark"] .nav-role option {
  background: var(--surface);
}

/* 밝게 하드코딩된 보조 표면들을 다크로 보정 */
[data-theme="dark"] .mode-radio,
[data-theme="dark"] .field-hint.block-hint,
[data-theme="dark"] .gospel-item,
[data-theme="dark"] .tg-copyrow code {
  background: var(--surface-2);
}

[data-theme="dark"] .film-thumb {
  background: #0d1117;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "Noto Sans KR", Arial, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

button,
select,
textarea,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 비로그인(게스트) 부팅: 관리자 콘솔이 한순간도 보이지 않게 숨기고, 로딩 스피너만 표시.
   게스트 화면(memberApp)이 렌더되면 JS가 guest-boot 클래스를 제거한다. */
html.guest-boot .app-shell { display: none !important; }
html.guest-boot body::before {
  content: "";
  position: fixed; inset: 0; z-index: 1;
  background: #141821;
}
html.guest-boot body::after {
  content: "";
  position: fixed; top: 50%; left: 50%; z-index: 2;
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 3px solid rgba(255,255,255,0.25); border-top-color: #fff;
  border-radius: 50%; animation: guestBootSpin 0.8s linear infinite;
}
@keyframes guestBootSpin { to { transform: rotate(360deg); } }

.topnav {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 10px 24px;
  background: #18231e;
  color: #f8faf4;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  flex: 0 0 auto;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.brand:hover .brand-mark { filter: brightness(1.08); }

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: var(--radius);
  background: #2f7658;
  font-weight: 800;
}

.brand strong,
.brand span,
.topnav-issue span,
.topnav-issue strong {
  display: block;
}

.brand span,
.topnav-issue span {
  color: rgba(248, 250, 244, 0.7);
  font-size: 0.82rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 42px;
  padding: 9px 6px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  color: rgba(248, 250, 244, 0.72);
  text-align: left;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.nav-item:hover {
  color: #ffffff;
}

.nav-item.active {
  color: #ffffff;
  font-weight: 700;
  border-bottom-color: #ffffff;
}

.icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  flex: 0 0 auto;
}

/* 언어/테마 토글 */
.nav-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.nav-tool-btn {
  min-width: 40px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8faf4;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
}

.nav-tool-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* 교회(테넌트) 선택기 */
.tenant-select {
  height: 36px;
  max-width: 190px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #f8faf4;
  font-size: 0.9rem;
  font-weight: 700;
}
.tenant-select option { color: #17324a; }
#addTenantBtn.has-pending { background: #b5651d; border-color: #d98a3d; animation: tmpulse 2s infinite; }
@keyframes tmpulse { 0%,100%{opacity:1;} 50%{opacity:.72;} }

/* 교회 관리 모달 (운영자 승인) */
.modal-overlay {
  position: fixed; inset: 0; z-index: 5200; display: grid; place-items: center;
  background: rgba(15, 22, 33, 0.5); padding: 20px;
}
.tm-card {
  width: min(560px, calc(100vw - 40px)); max-height: calc(100vh - 80px); overflow: auto;
  background: #fff; border-radius: 14px; padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.3);
  display: flex; flex-direction: column; gap: 16px;
}
.tm-head { display: flex; align-items: center; justify-content: space-between; }
.tm-head h3 { margin: 0; font-size: 18px; color: #17324a; }
.tm-head .icon-x { border: 0; background: transparent; font-size: 18px; cursor: pointer; color: #888; }
.tm-section-title { font-size: 12px; font-weight: 800; color: #888; letter-spacing: .04em; margin-bottom: 8px; }
.tm-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 14px; border: 1px solid #ececec; border-radius: 10px; margin-bottom: 8px;
}
.tm-info { display: flex; flex-direction: column; gap: 3px; }
.tm-info strong { font-size: 14.5px; color: #17324a; }
.tm-sub { font-size: 12px; color: #888; }
.tm-acts { display: flex; gap: 6px; flex: none; }
.tm-note { font-size: 12px; color: #aaa; }
.tm-badge { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.tm-badge.pending { background: #fde8cf; color: #b5651d; }
.tm-badge.ok { background: #e8f1ec; color: #2f7658; }
.tm-foot { border-top: 1px solid #eee; padding-top: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.tm-hint { margin: 0; font-size: 12px; color: #888; }

/* 메뉴바 내 임시 역할 선택 (추후 제거 예정) */
.nav-role {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8faf4;
  font-size: 0.84rem;
}

.nav-role option {
  color: var(--ink);
  background: #ffffff;
}

/* 우측 상단 사용자 칩 + 드롭다운 */
.user-box {
  position: relative;
  flex: 0 0 auto;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 12px 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-weight: 700;
}

.user-chip:hover {
  background: rgba(255, 255, 255, 0.14);
}

.avatar-sm {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--green);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
}

.user-chip-name {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 80;
  display: grid;
  gap: 8px;
  width: 240px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.user-menu[hidden] {
  display: none;
}

.user-menu-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.user-menu .text-button {
  text-align: left;
}

.main {
  min-width: 0;
  padding: 24px;
}

.topbar,
.section-toolbar,
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  margin-bottom: 22px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 1.8rem;
}

h2 {
  font-size: 1.45rem;
}

h3 {
  font-size: 1rem;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--green-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.top-actions,
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.top-actions {
  justify-content: flex-end;
  min-width: 0;
}

.select-label {
  color: var(--muted);
  font-size: 0.85rem;
}

select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

select,
input {
  min-height: 38px;
  padding: 0 10px;
  max-width: 100%;
}

input[type="file"] {
  padding: 6px 10px;
}

textarea {
  width: 100%;
  min-height: 190px;
  padding: 12px;
  resize: vertical;
  line-height: 1.55;
}

textarea.comment-input {
  min-height: 96px;
}

textarea.ta-s {
  min-height: 96px;
}

.field-hint {
  color: var(--muted);
  font-size: 0.76rem;
}

.block-hint {
  margin: 8px 0;
}

.icon-button,
.primary-button,
.text-button,
.danger-button,
.small-button {
  min-height: 38px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 700;
}

.primary-button:disabled,
.text-button:disabled,
.small-button:disabled,
.danger-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.icon-button {
  width: 40px;
  background: var(--surface);
  border-color: var(--line);
}

.primary-button {
  padding: 0 14px;
  background: var(--green);
  color: #ffffff;
}

.text-button {
  padding: 0 12px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--green-dark);
}

.danger-button {
  width: 100%;
  margin-top: 18px;
  background: #fff5f3;
  border-color: #efc5bf;
  color: var(--red);
}

.small-button {
  min-height: 32px;
  padding: 0 10px;
  border-color: var(--line);
  background: var(--surface);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.band,
.panel,
.editor-panel,
.error-submit-panel,
.user-card,
.section-card,
.message-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  background:
    linear-gradient(120deg, rgba(47, 118, 88, 0.12), rgba(52, 106, 159, 0.12)),
    var(--surface);
}

.status-line {
  margin-top: 8px;
  color: var(--muted);
}

.progress-block {
  position: relative;
  display: grid;
  width: 118px;
  height: 118px;
  place-items: center;
  flex: 0 0 auto;
}

.progress-ring {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.ring-bg,
.ring-fg {
  fill: none;
  stroke-width: 10;
}

.ring-bg {
  stroke: #dce4dd;
}

.ring-fg {
  stroke: var(--green);
  stroke-linecap: round;
  stroke-dasharray: 314;
  stroke-dashoffset: 314;
  transition: stroke-dashoffset 0.25s ease;
}

.progress-block strong {
  position: relative;
  font-size: 1.25rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.metric {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.metric span {
  color: var(--muted);
  font-size: 0.82rem;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 1.45rem;
}

.dashboard-grid,
.workflow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
}

.panel {
  padding: 18px;
}

.task-list,
.check-list,
.message-list,
.section-list,
.user-grid {
  display: grid;
  gap: 10px;
}

.task-list,
.check-list {
  margin-top: 14px;
}

.task-row,
.check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
}

.pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.editing {
  background: #e7f0ff;
  color: var(--blue);
}

.status-pill.review {
  background: #fff2df;
  color: var(--amber);
}

.status-pill.closed {
  background: #e4f4ea;
  color: var(--green-dark);
}

.status-pill.reopen {
  background: #fff5f3;
  color: var(--red);
}

.preview-panel {
  overflow: hidden;
}

/* 대시보드 미니 미리보기: 실제 주보 1-2면 축소 */
.jubo-mini-wrap {
  margin-top: 14px;
  height: 392px;
  overflow: hidden;
  padding: 8px;
  background: #e9eee9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.jubo-mini {
  display: flex;
  gap: 24px;
  width: 1612px;
  transform: scale(0.33);
  transform-origin: top left;
}

.jubo-mini .jubo-page {
  flex: 0 0 auto;
  box-shadow: 0 4px 14px rgba(23, 32, 27, 0.2);
}

.section-toolbar {
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}
.section-issuebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.section-issue-sel { min-height: 36px; min-width: 220px; }
.section-year-sel { min-height: 36px; min-width: 78px; }
.section-issue-search {
  min-height: 36px;
  width: 130px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: inherit;
  font-size: 13px;
}
.section-bar-sep { width: 1px; height: 22px; background: var(--line); margin: 0 2px; }
.section-zoom-hint { font-size: 12px; color: var(--muted, #7a8699); white-space: nowrap; }

/* 전체폭 미리보기 + 확대(zoom) */
.sections-editor-full { width: 100%; padding: 0; overflow: hidden; }
#sectionPreviewWrap { overflow: auto; max-height: calc(100vh - var(--nav-h, 60px) - 120px); }
.section-zoom-layer { zoom: var(--jz, 1); }

.hv-combo-reading .hv-combo-input { width: 130px; }

.sections-layout {
  display: grid;
  grid-template-columns: var(--list-w, 260px) 10px minmax(0, 1fr);
  gap: 0 6px;
  align-items: start;
}

.splitter {
  align-self: stretch;
  width: 10px;
  cursor: col-resize;
  border-radius: 6px;
  background:
    linear-gradient(to bottom, transparent, transparent) center / 2px 100% no-repeat,
    transparent;
  position: relative;
  touch-action: none;
}

.splitter::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 4px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
  transition: background 0.15s ease;
}

.splitter:hover::before,
.splitter.dragging::before {
  background: var(--green);
}

.section-card {
  padding: 11px;
  text-align: left;
  border-color: var(--line);
}

.section-card.active {
  outline: 3px solid rgba(47, 118, 88, 0.24);
}

.section-card button {
  all: unset;
  cursor: pointer;
  display: block;
  width: 100%;
}

.section-card-top,
.user-top,
.message-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.section-card-top {
  align-items: flex-start;
}

.section-card-top strong {
  font-size: 0.9rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.section-meta,
.user-meta,
.message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.editor-form h3 {
  overflow-wrap: anywhere;
}

.editor-panel {
  padding: 0;
  overflow: hidden;
}

.editor-workspace {
  display: grid;
  gap: 16px;
}

.editor-form,
.pdf-preview-wrap,
.error-submit-panel {
  padding: 18px;
}

.pdf-preview-wrap,
.error-submit-panel {
  border-top: 1px solid var(--line);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

.field-grid.compact {
  margin-bottom: 10px;
}

.field {
  display: grid;
  gap: 6px;
}

.field.span2 {
  grid-column: 1 / -1;
  margin: 10px 0;
}

.field label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

/* AI API 키 입력 — 붙여넣은 키가 보이도록 (password 아님) */
.key-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-family: ui-monospace, "Consolas", "Menlo", monospace;
  font-size: 0.9rem;
}

.editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* 주보 목록 */
.issue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.issue-card {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.issue-card.current {
  outline: 3px solid rgba(47, 118, 88, 0.28);
}

.issue-card.pdf {
  background: #fbfaf5;
}

.issue-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.issue-number {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-align: right;
}

.issue-date {
  font-size: 1.15rem;
}

.issue-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.issue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.small-button.primary {
  background: var(--green);
  border-color: var(--green);
  color: #ffffff;
}

.issue-note {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.check-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.topnav-issue[data-view] {
  cursor: pointer;
}

.topnav-issue[data-view]:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* 멀티선택 콤보박스 (부서) */
.mselect {
  position: relative;
  display: inline-block;
}

.mselect-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mselect-btn:disabled {
  cursor: default;
  opacity: 0.7;
}

.mselect-caret {
  font-size: 0.7em;
  color: var(--muted);
}

.mselect-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 45;
  display: none;
  min-width: 150px;
  max-height: 220px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 14px 30px rgba(23, 32, 27, 0.22);
}

.mselect.open .mselect-panel {
  display: grid;
  gap: 4px;
}

.mselect-option {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 4px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.mselect-option:hover {
  background: var(--surface-2);
}

/* 공지 제목 옆 부서 배지형 멀티선택 */
.notice-mselect {
  margin-left: 8px;
  vertical-align: 2px;
}

.notice-mselect .jp-dept-badge {
  font-size: 10.5px;
  min-height: 18px;
  padding: 0 8px;
}

.notice-mselect .mselect-panel {
  font-family: "Segoe UI", "Noto Sans KR", sans-serif;
  text-align: left;
  font-weight: 400;
}

/* 부서 설정 패널 */
.dept-panel {
  margin-bottom: 16px;
}

.dept-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.dept-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 3px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.86rem;
  font-weight: 700;
}

.dept-chip-del {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.dept-chip-del:hover {
  background: #f4d7d3;
  color: var(--red);
}

.dept-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dept-add-row input {
  max-width: 220px;
}

.small-button.danger {
  border-color: #efc5bf;
  background: #fff5f3;
  color: var(--red);
}

/* =========================================================
   예배 PPT 빌더
   ========================================================= */

.deck-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.deck-list {
  display: grid;
  gap: 10px;
}

.deck-card {
  position: relative;
  cursor: grab;
}

.deck-card:active {
  cursor: grabbing;
}

.deck-card-ops {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.deck-card-ops .small-button {
  min-width: 30px;
  min-height: 26px;
}

.deck-add-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.edited-mark {
  display: inline-block;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff2df;
  color: var(--amber);
  font-size: 0.68rem;
  font-weight: 800;
}

.deck-editor .editor-slimbar {
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.deck-editor .editor-slimbar .preview-tabs {
  margin-top: 0;
}

.deck-add-row select {
  flex: 1;
}

.deck-editor {
  padding: 0;
  overflow: hidden;
}

.deck-editor .editor-form {
  padding: 18px;
}

.mode-radio {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
  margin-top: 6px;
  cursor: pointer;
  line-height: 1.45;
}

/* ===== 예배 PPT — HolyView식 레이아웃 (좌: 페이지 썸네일 / 우: 큰 무대) ===== */
.deck-toolbar {
  flex-wrap: wrap;
  gap: 10px 14px;
}

.deck-toolbar .toolbar-actions {
  flex-wrap: wrap;
  gap: 6px;
}

.deck-toolbar .toolbar-actions .text-button,
.deck-toolbar .toolbar-actions .small-button {
  padding: 6px 10px;
}

.deck-stage-layout {
  display: grid;
  grid-template-columns: var(--deck-c1, 236px) 6px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.deck-split {
  align-self: stretch;
  width: 6px;
  min-height: 200px;
  border-radius: 3px;
  background: var(--line);
  cursor: col-resize;
  touch-action: none;
}

.deck-split:hover {
  background: var(--green);
}

/* 좌측 필름스트립 */
.deck-film {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.film-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 210px);
  overflow: auto;
  padding: 2px;
}

.film-sec {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 8px;
}

.film-sec.active {
  border-color: var(--green);
  box-shadow: 0 0 0 1px var(--green) inset;
}

.film-sec-head {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
}

.film-sec-name {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px;
  border: 0;
  background: none;
  text-align: left;
  color: var(--ink);
}

.film-sec-name strong {
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.film-sec-name .pill {
  flex: 0 0 auto;
}

.film-sec-ops {
  display: flex;
  gap: 2px;
  flex: 0 0 auto;
}

.film-sec-ops .mini {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1;
}

.film-sec-ops .mini:hover {
  border-color: var(--green);
  color: var(--green);
}

.film-sec-ops .mini.danger:hover {
  border-color: var(--red);
  color: var(--red);
}

.film-thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.film-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0;
}

.film-thumb.sel {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(47, 118, 88, 0.3);
}

.film-thumb .thumb-no {
  position: absolute;
  left: 4px;
  bottom: 4px;
  z-index: 2;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(23, 32, 27, 0.62);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
}

/* 스케일 래퍼 — 썸네일/무대 공통. 기준폭(SCALE_BASE)에서 JS가 배율 지정 */
.slide-scale {
  position: absolute;
  top: 0;
  left: 0;
  width: 384px;
  transform-origin: top left;
}

/* 우측 무대 */
.deck-stage-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.deck-stage {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-2);
}

.deck-stage.empty {
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
}

.deck-stage-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 4px 2px;
}

.stage-count {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ink);
  min-width: 62px;
  text-align: center;
}

.stage-sec {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-spacer {
  flex: 1;
}

/* 슬라이드 미리보기 그리드 */
.ppt-grid {
  display: grid;
  gap: 18px;
  margin-top: 14px;
  max-height: 900px;
  overflow: auto;
  padding: 4px;
}

.ppt-section-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.ppt-section-group.focus {
  border-color: var(--green);
  background: rgba(47, 118, 88, 0.04);
}

.ppt-group-label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

/* 슬라이드 공통 (16:9) — 아이브로우(상단 좌측 라벨) + 중앙 본문 구조 */
.ppt-slide {
  position: relative;
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 13% 8% 11%;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  word-break: keep-all;
  font-family: "Malgun Gothic", "맑은 고딕", sans-serif;
  box-shadow: 0 2px 10px rgba(18, 32, 58, 0.08);
}

.ppt-head {
  position: absolute;
  top: 7.5%;
  left: 8%;
  right: 8%;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 1.6px;
}

.ppt-head::before {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.ppt-subtitle {
  font-size: 1.02rem;
  font-weight: 800;
}

.ppt-body {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.7;
}

.ppt-page {
  position: absolute;
  right: 8%;
  bottom: 6.5%;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 1px;
  opacity: 0.55;
}

.ppt-slide.empty .ppt-body {
  opacity: 0.45;
  font-weight: 400;
}

.ppt-cover-title {
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: 5px;
  line-height: 1.35;
}

.ppt-cover-sub {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 3px;
  opacity: 0.75;
}

.ppt-cover-verse {
  margin-top: 10px;
  font-size: 0.74rem;
  font-weight: 500;
  opacity: 0.72;
  line-height: 1.7;
}

/* ----- 밝은 마스터 1: 라이트 클래식 (화이트 · 네이비 · 골드) ----- */
.ppt-slide[data-theme="lightClassic"] {
  background: #ffffff;
  color: #12203a;
  border: 1px solid #e6ecf6;
}

.ppt-slide[data-theme="lightClassic"] .ppt-head {
  color: #b8894a;
}

.ppt-slide[data-theme="lightClassic"] .ppt-subtitle {
  color: #35476b;
}

.ppt-slide[data-theme="lightClassic"]::after {
  content: "";
  position: absolute;
  left: 44%;
  right: 44%;
  bottom: 7%;
  height: 2px;
  border-radius: 1px;
  background: #c6a15b;
}

.ppt-slide[data-theme="lightClassic"].cover {
  background: linear-gradient(180deg, #ffffff 0%, #f2f5fb 100%);
}

.ppt-slide[data-theme="lightClassic"].cover .ppt-cover-sub {
  color: #b8894a;
  opacity: 1;
}

/* ----- 밝은 마스터 2: 라이트 블루 (연블루 배경 · 네이비) ----- */
.ppt-slide[data-theme="lightBlue"] {
  background: linear-gradient(165deg, #f2f5fb 0%, #e6ecf6 100%);
  color: #12203a;
  border: 1px solid #dbe3f0;
}

.ppt-slide[data-theme="lightBlue"] .ppt-head {
  color: #35476b;
}

.ppt-slide[data-theme="lightBlue"] .ppt-head::before {
  background: #9fb0cc;
  width: 22px;
}

.ppt-slide[data-theme="lightBlue"]::before {
  content: "";
  position: absolute;
  left: 8%;
  bottom: 7%;
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: #12203a;
}

.ppt-slide[data-theme="lightBlue"].cover .ppt-cover-title {
  color: #12203a;
}

/* ----- 밝은 마스터 3: 라이트 민트 (화이트 · 틸 포인트) ----- */
.ppt-slide[data-theme="lightMint"] {
  background:
    radial-gradient(circle at 100% 0%, #e2f5f1 0%, rgba(226, 245, 241, 0) 42%),
    radial-gradient(circle at 0% 100%, #eef9f6 0%, rgba(238, 249, 246, 0) 36%),
    #ffffff;
  color: #16342e;
  border: 1px solid #d8ede8;
}

.ppt-slide[data-theme="lightMint"] .ppt-head {
  color: #0e9384;
}

.ppt-slide[data-theme="lightMint"]::before {
  content: "";
  position: absolute;
  left: 8%;
  bottom: 7%;
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: #1fb3a3;
}

.ppt-slide[data-theme="lightMint"] .ppt-subtitle {
  color: #0e9384;
}

/* 원본 유지 슬라이드 (악보 등 — 마스터 영향 없음) */
.ppt-slide.original {
  background: #ffffff;
  color: #111111;
  padding: 0;
  justify-content: flex-start;
  border: 1px solid var(--line);
}

.ppt-slide.original img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ppt-orig-text {
  margin: auto;
  padding: 8%;
  font-weight: 700;
  line-height: 1.55;
}

.ppt-orig-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(23, 32, 27, 0.75);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 800;
}

@media (max-width: 980px) {
  .deck-layout {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   주보 디자인 스킨 (내용 동일 · 디자인만 변경)
   ========================================================= */

/* 스킨 2: 모던 네이비 — MZ·기성 모두를 위한 정돈된 고딕 스타일 */
.jubo-page[data-skin="modern"] {
  color: #1c2433;
  font-family: "Malgun Gothic", "맑은 고딕", sans-serif;
}

.jubo-page[data-skin="modern"] .jp-topbar,
.jubo-page[data-skin="modern"] .jp-bottombar {
  height: 5px;
  background: #1f3a5f;
}

.jubo-page[data-skin="modern"] .jp-motto {
  background: #1f3a5f;
  color: #ffffff;
}

.jubo-page[data-skin="modern"] .jp-graybar {
  background: #eef2f8;
  color: #1f3a5f;
  text-align: left;
  padding-left: 14px;
  border-left: 6px solid #1f3a5f;
}

.jubo-page[data-skin="modern"] .jp-hl-gray,
.jubo-page[data-skin="modern"] .jp-stats-title {
  background: #e3ebf7;
  color: #182a44;
}

.jubo-page[data-skin="modern"] .jp-hl-lav {
  background: #dce6f5;
  color: #182a44;
}

.jubo-page[data-skin="modern"] .jp-churchname {
  font-family: "Malgun Gothic", sans-serif;
  transform: none;
  letter-spacing: 6px;
  font-size: 28px;
  color: #1f3a5f;
}

.jubo-page[data-skin="modern"] .jp-order td {
  border-bottom: 1px solid #e2e7ef;
}

.jubo-page[data-skin="modern"] .jp-table th {
  background: #eef2f8;
  color: #1f3a5f;
}

.jubo-page[data-skin="modern"] .jp-table th,
.jubo-page[data-skin="modern"] .jp-table td {
  border-color: #b9c4d4;
}

.jubo-page[data-skin="modern"] .jp-hr,
.jubo-page[data-skin="modern"] .jp-group-head {
  border-color: #1f3a5f;
}

.jubo-page[data-skin="modern"] .jp-cover-footer {
  border-top-color: #1f3a5f;
}

.jubo-page[data-skin="modern"] .jp-ann.hl,
.jubo-page[data-skin="modern"] .jp-anns [style*="background-color"] {
  background: #dce6f5 !important;
}

/* 스킨 3: 웜 세리프 — 크림 종이 + 브라운 포인트의 따뜻한 명조 스타일 */
.jubo-page[data-skin="warm"] {
  background: #fbf7ef;
  color: #33291e;
  font-family: "Batang", "바탕", "Malgun Gothic", serif;
}

.jubo-page[data-skin="warm"] .jp-topbar,
.jubo-page[data-skin="warm"] .jp-bottombar {
  height: 4px;
  background: #8a5f36;
}

.jubo-page[data-skin="warm"] .jp-motto {
  background: #f1e6d4;
  color: #6c4a26;
}

.jubo-page[data-skin="warm"] .jp-graybar {
  background: transparent;
  color: #6c4a26;
  border-top: 2px solid #8a5f36;
  border-bottom: 2px solid #8a5f36;
}

.jubo-page[data-skin="warm"] .jp-hl-gray,
.jubo-page[data-skin="warm"] .jp-stats-title {
  background: #f1e6d4;
  color: #5d3f1f;
}

.jubo-page[data-skin="warm"] .jp-hl-lav {
  background: #ecdcc4;
  color: #5d3f1f;
}

.jubo-page[data-skin="warm"] .jp-churchname {
  color: #6c4a26;
}

.jubo-page[data-skin="warm"] .jp-order td {
  border-bottom: 1px dotted #c2a983;
}

.jubo-page[data-skin="warm"] .jp-table th {
  background: #f1e6d4;
}

.jubo-page[data-skin="warm"] .jp-table th,
.jubo-page[data-skin="warm"] .jp-table td {
  border-color: #a98d64;
}

.jubo-page[data-skin="warm"] .jp-hr,
.jubo-page[data-skin="warm"] .jp-group-head {
  border-color: #8a5f36;
}

.jubo-page[data-skin="warm"] .jp-cover-footer {
  border-top-color: #8a5f36;
}

.jubo-page[data-skin="warm"] .jp-ann.hl,
.jubo-page[data-skin="warm"] .jp-anns [style*="background-color"] {
  background: #ecdcc4 !important;
}

/* HolyView 송출 컨트롤러 */
.hv-status {
  font-size: 0.82rem;
  font-weight: 800;
}

.hv-status.on { color: var(--green-dark); }
.hv-status.off { color: var(--muted); }

.hv-fs {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px 12px 14px;
  min-width: 0;
}

.hv-fs legend {
  padding: 0 8px;
  color: var(--green-dark);
  font-weight: 800;
  font-size: 0.9rem;
}

/* 상단 툴바 고정 — 스크롤해도 그대로 */
.hv-toolbars {
  position: sticky;
  top: var(--nav-h, 64px);
  z-index: 12;
  background: var(--bg);
  padding-bottom: 6px;
  margin: 0 -4px;
  padding-inline: 4px;
}

/* 설정·검색: 라벨 없는 가로 툴바 */
.hv-settingsbar,
.hv-topbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

/* 검색 툴바(성경·찬송) — 라벨 없이 가로 나열 */
.hv-grp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid transparent;
}
/* 선택기 4종(성경·찬송·복음송·예식문) — 체크(포함)되면 강조 */
.hv-grp.armed {
  background: rgba(47, 118, 88, 0.08);
  border-color: rgba(47, 118, 88, 0.35);
}
.pick-check {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: var(--green, #2f7658);
  flex: 0 0 auto;
}
.hv-rite-sel { min-height: 36px; width: auto; min-width: 76px; max-width: 110px; }

.hv-topbar select {
  min-height: 36px;
}

.hv-topbar #hvVersion { min-width: 92px; }
.hv-topbar .hv-narrow { width: 72px; min-width: 60px; padding: 0 6px; }

/* 검색 콤보 */
.hv-combo {
  position: relative;
  display: inline-flex;
}

.hv-combo-input {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}

.hv-combo-book .hv-combo-input { width: 118px; }
.hv-combo-hymn .hv-combo-input { width: 210px; }
.hv-combo-gospel .hv-combo-input { width: 150px; }

/* 송출(즉시) 버튼 — 추가 버튼과 구분되게 옅은 아웃라인 */
.small-button.ghost {
  background: transparent;
  color: var(--muted, #667085);
  border-color: var(--line);
}
.small-button.ghost:hover {
  color: var(--green, #2f7658);
  border-color: var(--green, #2f7658);
}

.hv-combo-pop {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  min-width: 220px;
  max-width: 340px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hv-combo-opt {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink);
  text-align: left;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hv-combo-opt:hover {
  background: rgba(47, 118, 88, 0.12);
}

.hv-combo-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 0.85rem;
}

.hv-topbar .hv-range {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.hv-add-btn {
  min-height: 36px;
  padding: 0 12px;
}

.hv-fill-btn {
  font-weight: 700;
}

.hv-settingsbar #hvFont {
  min-width: 150px;
  flex: 0 1 200px;
}

.hv-tool {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hv-tool-ico {
  display: grid;
  place-items: center;
  width: 24px;
  height: 34px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.95rem;
}

.hv-tool select {
  width: 78px;
}

/* 툴바 구분선 제거 — 간격(gap)만으로 구분 */
.hv-tool-sep { display: none; }

/* 본문: 좌 컨트롤(성경·찬송) / 우 미리보기 */
.hv-main {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}

.hv-controls {
  display: grid;
  gap: 14px;
}

.hv-bible.active,
.hv-hymn.active {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 118, 88, 0.14);
}

.hv-field {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 9px 0;
}

.hv-field > label {
  flex: 0 0 40px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.hv-field select {
  flex: 1 1 auto;
  min-width: 0;
}

/* 검색 패널의 입력요소가 컬럼 안에서 항상 줄어들도록 */
.hv-search select,
.hv-search input {
  min-width: 0;
  max-width: 100%;
}

.hv-colorwrap input[type="color"] {
  width: 54px;
  height: 34px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.hv-range {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.hv-range select { flex: 1; min-width: 0; }

.hv-bgrow {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.hv-bg {
  width: 34px;
  height: 34px;
  border: 2px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  background-size: cover;
  background-position: center;
}

.hv-bg.sel { border-color: var(--green); }

.hv-bg.upload {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
  background: var(--surface-2);
}

.hv-show {
  width: 100%;
  margin-top: 10px;
  min-height: 44px;
  font-size: 1rem;
}

.hv-hymn-meta {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 4px 0 8px;
}

.hv-hymn-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0;
}

.hv-verse-ind {
  font-weight: 800;
  color: var(--green-dark);
}

/* 송출 미리보기 (밝은 테마) */
.hv-preview-wrap {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  position: sticky;
  top: 78px;
}

.hv-preview {
  margin-top: 12px;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  container-type: size;
  position: relative;
  background: #f0f0f0;
}

.hv-preview .hv-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 6% 4%;
  text-align: center;
  word-break: keep-all;
}

.hv-preview .hv-stage-inner {
  max-width: var(--hv-width, 80cqw);
}

.hv-preview .hv-head {
  font-size: calc(var(--hv-head, 2cqw) * var(--hv-fit, 1));
  opacity: 0.7;
  margin-bottom: 1.1em;
  font-weight: 700;
}

.hv-preview .hv-body {
  font-size: calc(var(--hv-size, 5cqw) * var(--hv-fit, 1));
  line-height: var(--hv-gap, 1.6);
  font-weight: 800;
}

.hv-preview .hv-body .hv-v { margin-right: 0.4em; }

.hv-preview .hv-body sup {
  font-size: 0.5em;
  opacity: 0.55;
  margin-right: 0.15em;
  vertical-align: super;
}

.hv-preview .hv-standby {
  font-size: var(--hv-head, 2cqw);
  opacity: 0.45;
  font-weight: 700;
}

.hv-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ===== 3단 송출 콘솔 (좌 검색 / 중 예약 / 우 무대) ===== */
.hv-console {
  display: grid;
  grid-template-columns: var(--hv-c1, 340px) 6px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  margin-top: 12px;
  min-height: calc(100vh - 250px);
}

.hv-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.hv-search {
  overflow: auto;
}

.hv-split {
  align-self: stretch;
  width: 6px;
  border-radius: 3px;
  background: var(--line);
  cursor: col-resize;
  touch-action: none;
}

.hv-split:hover {
  background: var(--green);
}

.hv-addrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.hv-addrow .small-button {
  flex: 1 1 88px;
  min-width: 0;
  min-height: 38px;
}

.hv-addrow .primary-button {
  flex: 0 1 auto;
  min-width: 0;
  padding: 0 12px;
}

.hv-quickadd {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hv-fill {
  width: 100%;
  min-height: 42px;
}

/* 가운데 예약 목록 */
.hv-playlist {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
}

.hv-playlist.drag-over {
  border: 2px dashed var(--green);
  background: rgba(47, 118, 88, 0.06);
}

/* 항목별 PPT 넣기 — 폴더 버튼 + 드롭존 */
.hv-attach-btn.on {
  background: var(--green, #2f7658);
  color: #fff;
  border-color: var(--green, #2f7658);
}
.hv-attach-drop {
  margin: 8px 4px 2px;
  border: 2px dashed var(--green, #2f7658);
  border-radius: 10px;
  background: rgba(47, 118, 88, 0.05);
  padding: 14px 12px;
  cursor: pointer;
  transition: background 0.12s;
}
.hv-attach-drop.drag-over {
  background: rgba(47, 118, 88, 0.16);
  border-style: solid;
}
.hv-attach-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text, #223);
  line-height: 1.45;
}
.hv-attach-inner small { color: var(--muted, #7a8699); }
.hv-attach-ico { font-size: 22px; }
.hv-attach-inner .small-button { margin-left: auto; }

.hv-ppt-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 6px;
  background: rgba(47, 118, 88, 0.14);
  color: var(--green, #2f7658);
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

/* 선택 슬라이드에 스타일 적용 중 배지 */
.hv-edit-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(47, 118, 88, 0.12);
  color: var(--green, #2f7658);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* PPT에서 고르기 팝업 */
.ppt-pick-card {
  width: min(880px, calc(100vw - 40px));
}

.ppt-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  max-height: min(60vh, 520px);
  overflow: auto;
  padding: 4px;
}

.ppt-pick-slide {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #f4f4f4;
  cursor: pointer;
}

.ppt-pick-slide:hover {
  border-color: var(--green);
}

.ppt-pick-slide.added {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(47, 118, 88, 0.3);
}

/* 내용은 절대배치 — 박스 높이는 aspect-ratio 로만 결정(찌부러짐 방지) */
.ppt-pick-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ppt-pick-txt {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 6px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  word-break: keep-all;
  overflow: hidden;
}

/* 배경 이미지가 있으면 글자에 반투명 판을 깔아 가독성 확보 */
.ppt-pick-img + .ppt-pick-txt {
  background: rgba(255, 255, 255, 0.55);
}

.ppt-pick-txt.empty {
  color: var(--muted);
  font-weight: 400;
}

.ppt-pick-no {
  position: absolute;
  left: 4px;
  top: 4px;
  z-index: 2;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(23, 32, 27, 0.62);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
}

.ppt-pick-badge {
  position: absolute;
  right: 4px;
  bottom: 4px;
  z-index: 2;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 800;
}

.hv-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.hv-col-head h3 {
  margin: 0;
  font-size: 1rem;
}

/* 서비스(1부/2부/수요) 탭 + 좌측 액션 */
.hv-svc-head {
  flex-wrap: wrap;
}

.hv-svc-tabs {
  flex: 1 1 auto;
  margin: 0;
  gap: 4px;
  flex-wrap: wrap;
}

.hv-issue-sel {
  flex: 0 1 auto;
  min-width: 150px;
  max-width: 230px;
  min-height: 36px;
  font-weight: 700;
}

.hv-topbar2 {
  background: var(--surface-2);
  gap: 8px;
  padding-top: 6px;
  padding-bottom: 6px;
  align-items: center;
}

/* 예배 탭: 박스 제거(테두리·배경·패딩) + 늘어나지 않게 → 다른 요소와 한 줄로 정렬 */
.hv-topbar2 .hv-svc-tabs {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

.hv-topbar2 .preview-tab,
.hv-topbar2 .small-button,
.hv-topbar2 .hv-issue-sel,
.hv-topbar2 .hv-saved-sel {
  min-height: 34px;
}

.hv-topbar2 .preview-tab:not(.active) {
  background: var(--surface);
  border: 1px solid var(--line);
}

.hv-svc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.hv-svc-actions .small-button {
  flex: 0 1 auto;
  min-height: 34px;
}

.hv-svc-actions .small-button.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.hv-saved-sel {
  flex: 0 1 auto;
  min-width: 150px;
  min-height: 36px;
}

.hv-svc-hint {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.hv-item.anchor {
  border-color: var(--green);
  background: rgba(47, 118, 88, 0.12);
  box-shadow: 0 0 0 2px rgba(47, 118, 88, 0.4), inset 4px 0 0 var(--green);
}
.hv-item.anchor .hv-item-name strong { color: var(--green); }

.hv-col-head .danger {
  margin-left: auto;
}

.hv-playlist-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* 카드 수만큼 아래로 늘어나게 — 내부 스크롤 없이 전체 카드가 한눈에 보이게 */
}

.hv-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 8px;
}
.hv-item.dragging { opacity: 0.4; }
.hv-item.drop-target { border-color: var(--green, #2f7658); box-shadow: 0 -3px 0 var(--green, #2f7658) inset; }

.hv-grip {
  flex: 0 0 auto;
  cursor: grab;
  color: var(--muted, #98a2b3);
  font-size: 15px;
  line-height: 1;
  user-select: none;
  padding: 0 2px;
}
.hv-grip:active { cursor: grabbing; }

.hv-playlist-top { margin-bottom: 8px; }

.hv-empty-svc {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 10px;
  color: var(--muted, #7a8699);
}
.hv-empty-svc p { margin: 0 0 4px; }

.hv-item-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.hv-item-head strong {
  flex: 1;
  min-width: 0;
  font-size: 0.86rem;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.hv-kind {
  flex: 0 0 auto;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
}

.hv-kind.bible { color: var(--blue); }
.hv-kind.hymn { color: var(--green-dark); }
.hv-kind.creed,
.hv-kind.prayer { color: var(--violet); }
.hv-kind.ppt { color: var(--amber); }

.hv-item-ops {
  display: flex;
  gap: 3px;
  flex: 0 0 auto;
  justify-content: flex-end;  /* 편집 버튼들을 제목 아래 둘째 줄 오른쪽에 */
  margin-top: 2px;
}

.hv-item-ops button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1;
}

.hv-item-ops button.danger:hover {
  border-color: var(--red);
  color: var(--red);
}

.hv-item-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.hv-page-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.78rem;
  color: var(--ink);
}

.hv-page-row.cur {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
  font-weight: 800;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.22);
  transform: translateY(1px);
}

.hv-page-row.cur .hv-page-no {
  opacity: 0.85;
}

.hv-page-no {
  font-weight: 800;
  font-size: 0.7rem;
  opacity: 0.6;
}

/* 우측 무대 */
.hv-stage-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
/* 슬라이드 선택 중 — 배경/글꼴 변경이 선택에 적용됨을 강조 */
.hv-stage-head.has-sel { border-color: var(--blue, #1d4ed8); background: rgba(29, 78, 216, 0.06); }
.hv-sel-lead {
  font-size: 12.5px; font-weight: 800; color: var(--blue, #1d4ed8);
  padding: 4px 9px; border-radius: 999px; background: rgba(29, 78, 216, 0.12); white-space: nowrap;
}
.hv-sel-lead.muted { color: var(--muted, #888); background: rgba(0, 0, 0, 0.05); font-weight: 700; }

.hv-page-count {
  min-width: 64px;
  text-align: center;
  font-weight: 800;
}

.hv-view-badge {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--amber);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.hv-stage-col .hv-preview {
  margin: 0;
  flex: 0 0 auto;
  max-height: 32vh;
}
.hv-preview-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted, #667085);
  margin-bottom: -4px;
}
.hv-preview-standby {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 8%;
  color: var(--muted, #667085);
  font-size: 0.9rem;
  line-height: 1.6;
}

.hv-preview .hv-stage.image {
  padding: 0;
}

.hv-preview .hv-stage.image .hv-stage-inner {
  max-width: 100%;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.hv-preview .hv-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* PPT 슬라이드: 배경 이미지 위에 가사 텍스트 덧씌우기 */
.hv-stage.image .hv-stage-inner { position: relative; }
.hv-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  box-sizing: border-box;
  padding: 4% 6%;
  font-size: calc(var(--hv-size, 5cqw) * var(--hv-fit, 1));
  line-height: var(--hv-gap, 1.5);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0.15em 0.5em rgba(0, 0, 0, 0.9), 0 0 0.15em rgba(0, 0, 0, 0.8);
  white-space: normal;
  overflow-wrap: break-word;
}

/* ===== 우측 4단 슬라이드 그리드 (전체 보기 · 클릭=현재 · 체크=선택) ===== */
.hv-grid {
  flex: 1 1 auto;
  min-height: 300px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
  overflow-y: auto;
  padding: 4px;
}

.hv-grid > .hv-empty {
  grid-column: 1 / -1;
  position: static;
  padding: 40px;
}

.hv-grid-group {
  grid-column: 1 / -1;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hv-grid-group-title { flex: 1; min-width: 0; }
.hv-grid-group-n { color: var(--muted); font-weight: 700; opacity: 0.75; }
.hv-grid-fold {
  flex: 0 0 auto; width: 20px; height: 20px; padding: 0;
  border: 1px solid var(--line); border-radius: 5px; background: var(--surface);
  color: var(--muted); font-size: 0.6rem; cursor: pointer; line-height: 1;
}
.hv-grid-fold:hover { border-color: var(--green, #2f7658); color: var(--green, #2f7658); }
.hv-grid-selall {
  flex: 0 0 auto; padding: 2px 9px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--slate, #2f4a6b); font-size: 0.68rem; font-weight: 800; cursor: pointer; white-space: nowrap;
}
.hv-grid-selall:hover { border-color: var(--blue, #1d4ed8); }
.hv-grid-selall.on { background: var(--blue, #1d4ed8); color: #fff; border-color: var(--blue, #1d4ed8); }

.hv-grid-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  container-type: size;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #f0f0f0;
  padding: 0;
  cursor: pointer;
}

.hv-grid-thumb:hover { border-color: var(--green); }
.hv-grid-thumb.cur { border-color: var(--green); box-shadow: 0 0 0 2px rgba(47, 118, 88, 0.35); }
.hv-grid-thumb.sel { border-color: var(--blue); }

/* 좌측 카드 전역 고정(📌) 켜짐 표시 */
.hv-pin-btn { opacity: 0.4; }
.hv-pin-btn.on { opacity: 1; background: rgba(47, 118, 88, 0.16); border-radius: 5px; }

/* 크게 편집 버튼 (썸네일) */
.thumb-big {
  position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; z-index: 3;
  border: 0; border-radius: 6px; background: rgba(0, 0, 0, 0.45); color: #fff;
  font-size: 13px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity 0.12s;
}
.hv-grid-thumb:hover .thumb-big { opacity: 1; }
.thumb-big:hover { background: var(--green, #2f7658); }

/* 크게 편집 캔버스 */
.hv-editcanvas { display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; min-height: 0; }
.hv-editcanvas-bar { display: flex; align-items: center; gap: 8px; }
.hv-editcanvas-stage {
  width: 100%; max-width: 1000px; margin: 0 auto; aspect-ratio: 16 / 9;
  container-type: size; position: relative;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
}
.hv-editcanvas-stage .hv-stage { position: absolute; inset: 0; }
.hv-editcanvas-stage [contenteditable] { outline: none; cursor: text; border-radius: 4px; }
.hv-editcanvas-stage [contenteditable]:hover { box-shadow: 0 0 0 1px rgba(47, 118, 88, 0.5); }
.hv-editcanvas-stage [contenteditable]:focus { box-shadow: 0 0 0 2px var(--green, #2f7658); background: rgba(255, 255, 255, 0.5); }
.hv-editcanvas-stage [contenteditable]:empty::before { content: attr(data-ph); opacity: 0.4; }

/* 슬라이드 인라인 편집 (그리드에서 안내/텍스트 직접 편집) */
.hv-grid-thumb [contenteditable] { outline: none; cursor: text; border-radius: 3px; }
.hv-grid-thumb [contenteditable]:hover { box-shadow: 0 0 0 1px rgba(47, 118, 88, 0.45); }
.hv-grid-thumb [contenteditable]:focus { box-shadow: 0 0 0 2px var(--green, #2f7658); background: rgba(255, 255, 255, 0.55); }
.hv-grid-thumb [contenteditable]:empty::before { content: attr(data-ph); opacity: 0.4; }

/* 그리드 끝 [＋추가] 타일 */
.hv-grid-add {
  aspect-ratio: 16 / 9;
  border: 2px dashed var(--green, #2f7658);
  border-radius: 8px;
  background: rgba(47, 118, 88, 0.06);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--green, #2f7658); font-weight: 800; font-size: 0.9rem; cursor: pointer;
}
.hv-grid-add:hover { background: rgba(47, 118, 88, 0.14); }
.hv-grid-add .hv-grid-add-plus { font-size: 1.7rem; line-height: 1; }

/* [＋추가] 팝업 패널 (그리드 끝 타일이 여는 선택기) */
.hv-add-panel {
  position: fixed; z-index: 60;
  left: 50%; top: 92px; transform: translateX(-50%);
  width: min(940px, 94vw);
  background: var(--card, #fff); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  padding: 12px 14px;
}
.hv-add-panel[hidden] { display: none; }
.hv-add-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 0.95rem; color: var(--slate, #2f4a6b); }
.hv-add-panel .hv-picker-row { margin: 0; padding: 0; border: 0; background: transparent; }

.hv-grid-thumb .hv-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 6% 4%;
  text-align: center;
  word-break: keep-all;
}
.hv-grid-thumb .hv-stage.image { padding: 0; }
.hv-grid-thumb .hv-stage-inner { max-width: var(--hv-width, 80cqw); }
.hv-grid-thumb .hv-stage.image .hv-stage-inner { max-width: 100%; width: 100%; height: 100%; display: grid; place-items: center; }
.hv-grid-thumb .hv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hv-grid-thumb .hv-head { font-size: calc(var(--hv-head, 2cqw) * var(--hv-fit, 1)); opacity: 0.7; margin-bottom: 0.9em; font-weight: 700; }
.hv-grid-thumb .hv-body { font-size: calc(var(--hv-size, 5cqw) * var(--hv-fit, 1)); line-height: var(--hv-gap, 1.6); font-weight: 700; }
.hv-grid-thumb .hv-body .hv-v { margin-right: 0.4em; }
.hv-grid-thumb .hv-body sup { font-size: 0.5em; opacity: 0.55; margin-right: 0.15em; vertical-align: super; }

/* 크게 편집 캔버스도 무대와 동일한 배율(cqw)로 크게 렌더 */
.hv-editcanvas-stage .hv-stage { position: absolute; inset: 0; display: grid; place-items: center; padding: 5% 4%; text-align: center; word-break: keep-all; }
.hv-editcanvas-stage .hv-stage.image { padding: 0; }
.hv-editcanvas-stage .hv-stage-inner { max-width: var(--hv-width, 80cqw); }
.hv-editcanvas-stage .hv-stage.image .hv-stage-inner { max-width: 100%; width: 100%; height: 100%; display: grid; place-items: center; }
.hv-editcanvas-stage .hv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hv-editcanvas-stage .hv-head { font-size: calc(var(--hv-head, 2cqw) * var(--hv-fit, 1)); opacity: 0.7; margin-bottom: 0.9em; font-weight: 700; }
.hv-editcanvas-stage .hv-body { font-size: calc(var(--hv-size, 5cqw) * var(--hv-fit, 1)); line-height: var(--hv-gap, 1.6); font-weight: 700; }

.hv-grid-thumb .thumb-no {
  position: absolute;
  left: 4px;
  bottom: 4px;
  z-index: 3;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(23, 32, 27, 0.62);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
}

.thumb-check {
  position: absolute;
  right: 4px;
  top: 4px;
  z-index: 4;
  width: 24px;
  height: 24px;
  padding: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 2px solid var(--blue);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue);
  font-weight: 900;
  font-size: 0.8rem;
  line-height: 1;
}
.thumb-check:hover { background: #fff; box-shadow: 0 0 0 2px rgba(47, 118, 88, 0.25); }
.thumb-check.on { background: var(--blue); color: #fff; }

/* 썸네일 클릭 = 편집 */
.hv-grid-thumb[data-grid-edit] { cursor: pointer; }

/* 슬라이드 편집 — 우측에서 슬라이드 인 되는 패널 */
.hv-editor-modal { display: flex; justify-content: flex-end; align-items: stretch; }
.hv-editor-modal .hv-editor-card {
  width: min(480px, 94vw);
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  overflow-y: auto;
  align-content: start;
  animation: hvEditorIn 0.18s ease;
}
@keyframes hvEditorIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.hv-editor-card { width: min(680px, calc(100vw - 40px)); }
.hv-editor-preview {
  aspect-ratio: 16 / 9;
  container-type: size;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin: 6px 0 12px;
  background: #fff;
}
.hv-editor-preview .hv-stage { position: absolute; inset: 0; display: grid; place-items: center; padding: 4%; text-align: center; word-break: keep-all; }
.hv-editor-preview .hv-stage.image { padding: 0; }
.hv-editor-preview .hv-stage-inner { max-width: var(--hv-width, 80cqw); }
.hv-editor-preview .hv-stage.image .hv-stage-inner { max-width: 100%; width: 100%; height: 100%; position: relative; }
.hv-editor-preview .hv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hv-editor-preview .hv-head { font-size: calc(var(--hv-head, 2cqw) * var(--hv-fit, 1)); opacity: 0.7; margin-bottom: 1em; font-weight: 700; }
.hv-editor-preview .hv-body { font-size: calc(var(--hv-size, 5cqw) * var(--hv-fit, 1)); line-height: var(--hv-gap, 1.5); font-weight: 700; }
.hv-editor-preview .hv-body .hv-v { margin-right: 0.4em; }
.hv-editor-preview .hv-body sup { font-size: 0.5em; opacity: 0.55; vertical-align: super; }
/* 서식 툴바 — 기본 숨김, 편집 필드에 커서가 오면(팝업 안 포커스) 위쪽에 펼쳐짐 (주보 편집툴처럼) */
.hv-editor-tools {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.hv-editor-card:focus-within .hv-editor-tools {
  display: flex;
  margin-bottom: 12px;
}
.hv-editor-tools select { min-height: 34px; }
.hv-editor-card textarea { width: 100%; resize: vertical; min-height: 84px; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; box-sizing: border-box; }

.hv-editor-replace {
  border: 1px dashed var(--green, #2f7658);
  border-radius: 10px;
  background: rgba(47, 118, 88, 0.05);
  padding: 12px;
  display: grid;
  gap: 8px;
}
.hv-editor-replace-title { font-weight: 700; font-size: 0.9rem; color: var(--green, #2f7658); }
.hv-editor-replace-btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* 공용 추가 팔레트 (카드 상세 팝업) */
.hv-ed-palette {
  border: 1px solid var(--slate, #2f4a6b); border-radius: 10px;
  background: rgba(47, 74, 107, 0.05); padding: 12px; display: grid; gap: 9px; margin-top: 10px;
}
.hv-ed-palette-title { font-weight: 800; font-size: 0.88rem; color: var(--slate, #2f4a6b); }

/* 추가 팔레트: 한 종류(성경·찬송·복음송·교독문)당 한 줄. 좁으면 줄바꿈 → 가로 스크롤 없음 */
.hv-ed-pickrows { display: flex; flex-direction: column; gap: 8px; max-width: 100%; }
.hv-ed-grp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; max-width: 100%; }
.hv-ed-grp-label { flex: 0 0 auto; min-width: 42px; font-size: 12px; font-weight: 800; color: var(--slate, #2f4a6b); }
.hv-ed-break { flex-basis: 100%; height: 0; }             /* 성경: 장·절을 다음 줄로 강제 개행 */
.hv-ed-grp-row .hv-combo { flex: 1 1 150px; min-width: 0; max-width: 100%; }
.hv-ed-grp-row .hv-combo-input { width: 100%; min-width: 0; box-sizing: border-box; }
.hv-ed-grp-row .hv-ver-sel { flex: 0 1 auto; max-width: 44%; min-width: 0; }
.hv-ed-grp-row select { min-width: 0; }
.hv-ed-grp-row .small-button { flex: 0 0 auto; }

.hv-ed-palette-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.hv-ed-palette-row label { font-size: 12.5px; font-weight: 700; color: #555; }
.hv-ed-palette-row input[type="text"] { min-width: 130px; }
.hv-ed-palette-row input[type="number"] { width: 74px; }
.hv-ed-palette-row input { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; font: inherit; }
.hv-ed-subs { display: grid; gap: 5px; margin-top: 10px; }
.hv-ed-subs-title { font-weight: 800; font-size: 0.85rem; color: #888; }
.hv-ed-sub {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 13px;
}
.hv-ed-sub > span:nth-child(2) { flex: 1; }
.hv-ed-sub .hv-bt { width: 24px; height: 24px; border: 0; border-radius: 5px; background: transparent; color: #b6603a; font-weight: 800; cursor: pointer; }

/* 전역 고정 토글 (상세 팝업) */
.hv-ed-pin {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 2px;
  font-size: 13px; font-weight: 700; color: var(--slate, #2f4a6b); cursor: pointer;
}
.hv-ed-pin input { width: 16px; height: 16px; cursor: pointer; }

/* 고정 안내 슬라이드 (곧 예배가 시작됩니다 …) */
.hv-notice { display: flex; flex-direction: column; align-items: center; gap: 0.5em; text-align: center; }
.hv-notice-title { font-weight: 800; line-height: 1.15; }
.hv-notice-sub {
  font-size: 0.58em; font-weight: 700; opacity: 0.82;
  padding-top: 0.55em; margin-top: 0.15em; border-top: 0.055em solid currentColor;
}
.hv-ed-sub .hv-bt:hover { background: #fdecec; }

/* 좌측 카드 이름 (클릭 = 그리드로 이동) */
.hv-item-name {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px;
  border: 0;
  background: none;
  text-align: left;
  color: var(--ink);
}
.hv-item-name strong { flex: 1; min-width: 0; font-size: 0.86rem; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; } /* 제목 전체 표시 (필요하면 줄바꿈) */
.hv-item-count { flex: 0 0 auto; color: var(--muted); font-size: 0.72rem; font-weight: 700; }

@media (max-width: 1100px) {
  .hv-console {
    grid-template-columns: 1fr;
  }

  .hv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .hv-split {
    display: none;
  }

  .hv-playlist-list {
    max-height: 320px;
  }
}

@media (max-width: 900px) {
  .hv-settings-grid,
  .hv-main {
    grid-template-columns: 1fr;
  }

  .hv-preview-wrap {
    position: static;
  }
}

/* 콘텐츠 사용 동의 */
.consent-panel {
  max-width: 720px;
}

.consent-panel h3 {
  margin-bottom: 10px;
}

.consent-body {
  line-height: 1.6;
  color: var(--ink);
}

.consent-list {
  margin: 12px 0;
  padding-left: 20px;
  line-height: 1.7;
  color: var(--muted);
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
  line-height: 1.5;
  cursor: pointer;
}

.consent-check input {
  margin-top: 2px;
}

/* 라이브러리 */
.library-tabs {
  margin: 14px 0 4px;
}

.verse-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.verse-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
  padding: 10px;
}

.verse-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.verse-label {
  width: 90px;
  min-height: 32px;
}

.verse-head .small-button {
  min-width: 32px;
}

.verse-text {
  min-height: 76px;
}

.song-preview {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  max-height: 620px;
  overflow: auto;
  padding: 4px;
}

.song-slide {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 18px 22px;
  border-radius: 10px;
  background: #12161f;
  color: #f4f6fb;
  text-align: center;
  align-content: center;
}

/* 악보 통이미지 곡 */
.song-slide.score {
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 8px;
}

.song-slide.score img {
  width: 100%;
  border-radius: 6px;
}

.song-slide.score .song-slide-foot {
  color: var(--muted);
}

.score-field {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
}

.score-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
}

.score-strip img {
  height: 110px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.song-slide-head {
  color: #aeb7c8;
  font-size: 0.82rem;
}

.song-slide-body {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.6;
  word-break: keep-all;
}

.song-slide-foot {
  color: #8890a2;
  font-size: 0.75rem;
}

/* 편집기 상단 슬림바 + 접이식 설정 */
.pdf-preview-wrap.first {
  border-top: 0;
}

.editor-slimbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.editor-slimbar strong {
  font-size: 1.02rem;
}

.slim-hint {
  color: var(--muted);
  font-size: 0.8rem;
}

.slim-hint.locked {
  color: var(--red);
}

.meta-details {
  border-top: 1px solid var(--line);
  padding: 0 18px 14px;
}

.meta-details summary {
  padding: 12px 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.meta-details summary:hover {
  color: var(--green-dark);
}

/* 예배 PPT 슬라이드 인라인 편집 */
.ppt-ed[contenteditable="true"] {
  display: inline-block;
  min-width: 30px;
  min-height: 1em;
  border-radius: 3px;
  outline: 1px dashed rgba(120, 170, 255, 0.45);
  outline-offset: 2px;
}

.ppt-ed[contenteditable="true"]:hover {
  outline-color: rgba(120, 170, 255, 0.85);
}

.ppt-ed[contenteditable="true"]:focus {
  outline: 2px solid rgba(120, 170, 255, 0.95);
  background: rgba(120, 170, 255, 0.08);
}

.ppt-ed[contenteditable="true"]:empty::before {
  content: attr(data-ph);
  opacity: 0.45;
}

.ppt-slide[data-lock] {
  cursor: not-allowed;
}

/* 내 마스터(사용자 PPT 배경) */
.ppt-slide.custom {
  background-size: cover;
  background-position: center;
  color: #ffffff;
  font-family: "Malgun Gothic", "맑은 고딕", sans-serif;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85), 0 0 3px rgba(0, 0, 0, 0.9);
}

.ppt-slide.custom .ppt-head {
  color: #ffffff;
  opacity: 0.88;
}

/* 마스터 배경 선택 모달 */
.master-picker {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(15, 22, 18, 0.55);
}

.master-picker[hidden] {
  display: none;
}

.mp-body {
  width: min(760px, calc(100vw - 40px));
  max-height: calc(100vh - 80px);
  overflow: auto;
  padding: 20px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.mp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.mp-grid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 3px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  background: #eee;
}

.mp-grid img:hover {
  border-color: rgba(47, 118, 88, 0.45);
}

.mp-grid img.sel {
  border-color: var(--green);
}

/* 텔레그램 초대 모달 (bnb 사용자 관리 미러링) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(15, 22, 18, 0.55);
}

/* AI 변환 중 오버레이 */
.ai-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(15, 22, 18, 0.62);
}
.ai-overlay[hidden] { display: none; }
.ai-overlay-card {
  width: min(420px, calc(100vw - 40px));
  padding: 28px 24px;
  border-radius: 16px;
  background: var(--surface, #fff);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  text-align: center;
  display: grid;
  gap: 10px;
  justify-items: center;
}
.ai-overlay-card h3 { margin: 4px 0 0; }
.ai-overlay-card p { margin: 0; color: var(--muted, #667085); line-height: 1.5; }
.ai-overlay-file {
  margin-top: 4px !important;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(47, 118, 88, 0.1);
  color: var(--green, #2f7658) !important;
  font-weight: 700;
  font-size: 0.9rem;
}
.ai-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(47, 118, 88, 0.2);
  border-top-color: var(--green, #2f7658);
  border-radius: 50%;
  animation: aiSpin 0.9s linear infinite;
}
@keyframes aiSpin { to { transform: rotate(360deg); } }
.ai-error-mark { font-size: 40px; line-height: 1; }
.ai-overlay-hint {
  font-size: 0.82rem !important;
  color: var(--muted, #667085);
  background: rgba(214, 92, 84, 0.08);
  padding: 8px 12px;
  border-radius: 8px;
  line-height: 1.5;
}

/* 업로드 PDF 원본 보기 (편집 전) */
.pdf-archive {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 0;
}
.pdf-archive-hint {
  margin: 0;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(47, 118, 88, 0.08);
  color: var(--text, #1f2933);
  line-height: 1.5;
}
.pdf-archive-frame {
  flex: 1;
  min-height: 70vh;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-2, #f3f5f4);
  display: grid;
  place-items: center;
}
.pdf-archive-iframe {
  width: 100%;
  height: 100%;
  min-height: 70vh;
  border: 0;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(520px, calc(100vw - 40px));
  max-height: calc(100vh - 80px);
  overflow: auto;
  padding: 22px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.tg-copyrow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tg-copyrow code {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(47, 118, 88, 0.05);
  font-family: "Consolas", "Menlo", monospace;
  font-size: 0.92rem;
  color: var(--ink);
  overflow-x: auto;
  white-space: nowrap;
}

.tg-invite-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

/* 복음송 검색 목록 */
.gospel-list {
  display: grid;
  gap: 4px;
  max-height: 360px;
  overflow: auto;
  margin: 4px 0;
}

.gospel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
  font-size: 0.9rem;
}

.gospel-item:hover {
  border-color: var(--green);
  background: rgba(47, 118, 88, 0.05);
}

.gospel-item .pill {
  background: #fff2df;
  color: var(--amber);
}

/* 마스터 디자인(폰트/색) 선택 */
.mp-design {
  display: grid;
  gap: 8px;
}

.mp-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mp-row label {
  flex: 0 0 92px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.mp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 3px 10px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.85rem;
}

.mp-chip.sel {
  border-color: var(--green);
  background: rgba(47, 118, 88, 0.07);
}

.mp-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

/* 예배(덱) 탭 */
.deck-service-tabs {
  margin-top: 10px;
}

.deck-service-tabs .small-button {
  min-height: 30px;
}

/* 미리보기 직접 편집 안내 */
.edit-hint {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: #f6f9f6;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.preview-tabs-slot .preview-tabs {
  margin-top: 0;
}

.preview-tabs {
  display: inline-flex;
  gap: 4px;
  margin-top: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f3f6f3;
}

.preview-tab {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.preview-tab.active {
  background: var(--green);
  color: #ffffff;
}

.pdf-frame {
  display: grid;
  justify-items: center;
  gap: 26px;
  margin-top: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #e9eee9;
  overflow: auto;
}

.pdf-frame.full-preview {
  max-height: 1100px;
  align-content: start;
}

/* 전주와 비교: 좌(현재 편집본) / 우(지난 주보 읽기 전용) */
.pdf-frame.compare-frame {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
  justify-items: stretch;
}

.compare-col {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.compare-select {
  min-height: 30px;
  max-width: 240px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.compare-none-note {
  font-size: 0.82rem;
  color: var(--muted, #667085);
  font-style: italic;
  padding: 4px 2px;
}

/* 아이콘 전용 툴바 버튼 (텍스트 없이 아이콘만 · 설명은 hover 툴팁) */
.small-button.icon-only {
  min-width: 34px;
  padding: 6px 8px;
  font-size: 15px;
  line-height: 1;
  text-align: center;
}

/* 비교 칸에 들어가는 원본 PDF */
.compare-pdf {
  min-height: 900px;
  max-height: 1020px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2, #f3f5f4);
  display: grid;
  place-items: center;
}
.compare-pdf .pdf-archive-iframe {
  width: 100%;
  height: 100%;
  min-height: 900px;
  border: 0;
}
.compare-head {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #141821;
  color: #ffffff;
  font-size: 0.85rem;
}

.compare-head.current {
  background: var(--green-dark);
}

.compare-head span {
  flex: 1 1 auto;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compare-close {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 13px;
  line-height: 1;
}

.compare-close:hover {
  background: rgba(214, 92, 84, 0.65);
}

.compare-pages {
  display: grid;
  gap: 18px;
  justify-items: center;
  max-height: 1020px;
  overflow: auto;
  padding: 4px;
}

.compare-pages .jubo-page {
  zoom: 0.66;
}

.compare-pages.readonly {
  opacity: 0.96;
}

.preview-tab.compare-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.preview-tab.compare-tab.active {
  background: var(--blue);
  color: #ffffff;
}

@media (max-width: 1200px) {
  .pdf-frame.compare-frame {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   주보 페이지 (주보20260104.pdf 디자인 재현)
   ========================================================= */

.jubo-page {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 794px;
  min-height: 1123px;
  padding: 30px 46px 22px;
  background: #ffffff;
  color: #000000;
  font-family: var(--jubo-font);
  font-size: 13.5px;
  line-height: 1.5;
  box-shadow: 0 16px 34px rgba(23, 32, 27, 0.16);
  word-break: keep-all;
}

.jubo-page.boxed {
  padding: 26px 30px 20px;
}

/* ---------- 블록 렌더러 (blocks 모드 테넌트: 데이터 구동 주보) ---------- */
.jp-blocks { display: flex; flex-direction: column; gap: 16px; padding: 6px 4px; }
.jp-block { break-inside: avoid; }
.jp-block-title {
  margin: 0 0 7px; font-size: 15px; font-weight: 800; color: #17324a;
  border-bottom: 2px solid #17324a; padding-bottom: 3px;
}
.jp-block-scroll { overflow-x: auto; }

/* 교회소식 */
.jp-notice-list { display: flex; flex-direction: column; gap: 2px; }
.jp-notice-item { margin: 0; font-size: 12.5px; line-height: 1.5; }

/* 표(봉사자·통계) */
.jp-grid-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.jp-grid-table th, .jp-grid-table td { border: 1px solid #bcbcbc; padding: 4px 8px; text-align: left; }
.jp-grid-table th { background: #eef2f6; font-weight: 700; }
.jp-block-stats .jp-grid-table td { font-variant-numeric: tabular-nums; }

/* 연락처 그리드 */
.jp-contacts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.jp-contact { border: 1px solid #d8d8d8; border-radius: 6px; padding: 6px 9px; }
.jp-contact-dept { font-size: 11px; color: #2f7658; font-weight: 700; }
.jp-contact-name { font-size: 12.5px; font-weight: 700; }
.jp-contact-phone { font-size: 12px; color: #444; font-variant-numeric: tabular-nums; }

/* 목회표어 */
.jp-block-motto { text-align: center; background: #f6efe1; border-radius: 8px; padding: 14px 18px; }
.jp-motto-ref { font-size: 12px; font-weight: 800; color: #a9803a; margin-bottom: 6px; }
.jp-motto-text { font-size: 13px; line-height: 1.7; color: #3a2f1a; }

/* 예배·모임 시간 */
.jp-schedule-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.jp-schedule-table td { padding: 5px 8px; border-bottom: 1px solid #e3e0d6; }
.jp-sch-label { font-weight: 700; }
.jp-sch-time { text-align: right; font-variant-numeric: tabular-nums; color: #333; }

/* 헌금 계좌 */
.jp-block-offering .jp-offering { font-size: 12.5px; line-height: 1.6; background: #eef2f6; border-radius: 6px; padding: 9px 12px; }

/* 설교/글 */
.jp-block-sermon .jp-block-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.jp-sermon-ref { font-size: 12px; font-weight: 600; color: #666; }
.jp-sermon-body { font-size: 12.5px; line-height: 1.65; }
.jp-sermon-body br { content: ""; }

/* 자유 텍스트 · 표지 */
.jp-text-body { font-size: 12.5px; line-height: 1.6; }
.jp-block-cover { text-align: center; padding: 20px 0; }
.jp-cover-church { font-size: 24px; font-weight: 800; color: #17324a; }
.jp-cover-motto { font-size: 13px; color: #555; margin-top: 8px; line-height: 1.6; }
.jp-cover-issue { font-size: 12px; color: #888; margin-top: 10px; }

@media (max-width: 680px) {
  .jp-contacts-grid { grid-template-columns: 1fr 1fr; }
}

/* 블록 관리 도구 (편집 모드) */
.jp-blockwrap { position: relative; border-radius: 6px; transition: background .12s; }
.jp-blockwrap:hover { background: rgba(47, 118, 88, 0.05); box-shadow: 0 0 0 1px rgba(47, 118, 88, 0.2); }
.jp-block-tools {
  position: absolute; top: -10px; right: 4px; z-index: 3;
  display: none; gap: 3px; padding: 2px; border-radius: 8px;
  background: #17324a; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}
.jp-blockwrap:hover .jp-block-tools { display: flex; }
.jp-bt {
  border: 0; border-radius: 5px; background: transparent; color: #fff;
  width: 24px; height: 24px; font-size: 13px; font-weight: 800; cursor: pointer; line-height: 1;
}
.jp-bt:hover { background: rgba(255, 255, 255, 0.2); }
.jp-bt.danger:hover { background: #c0392b; }
.jp-blocks-addbar { text-align: center; padding: 6px; }
.jp-blocks-addbar .jp-bt {
  width: auto; height: auto; padding: 6px 16px; font-size: 12px; font-weight: 700;
  background: #eef2f6; color: #2f4a6b; border: 1px dashed #9fb3c8;
}
.jp-blocks-addbar .jp-bt:hover { background: #e0e8f0; }

/* 블록 타입 선택 팝업 */
.block-picker {
  position: fixed; z-index: 5000; min-width: 170px; padding: 6px;
  background: #fff; border: 1px solid var(--line, #e3e0d6); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2); display: flex; flex-direction: column; gap: 2px;
}
.block-picker-title { font-size: 11px; font-weight: 800; color: #888; padding: 4px 10px; letter-spacing: .04em; }
.block-picker-opt {
  text-align: left; border: 0; background: transparent; padding: 8px 12px;
  border-radius: 6px; font-size: 13.5px; font-weight: 600; color: #17324a; cursor: pointer;
}
.block-picker-opt:hover { background: #eef2f6; }

.jubo-page.boxed .jp-boxframe {
  flex: 1;
  border: 1px solid #444444;
  padding: 26px 30px;
  margin-bottom: 12px;
}

.jp-topbar {
  height: 7px;
  background: #000000;
  margin-bottom: 10px;
}

.jp-bottombar {
  height: 7px;
  background: #000000;
  margin-top: auto;
}

.jp-hr {
  border: 0;
  border-top: 1px solid #333333;
  margin: 8px 0;
}

.jp-hr.thick {
  border-top-width: 1.5px;
  margin: 12px 0;
}

/* 강조 배경 */
.jp-hl-gray {
  background: var(--jubo-gray);
  padding: 1px 10px;
}

.jp-hl-lav {
  background: var(--jubo-lav);
  padding: 1px 10px;
}

.jp-graybar {
  background: var(--jubo-gray);
  text-align: center;
  font-weight: 800;
  font-size: 16px;
  padding: 3px 0;
  margin: 14px 0 10px;
}

.jp-center-title {
  text-align: center;
  font-weight: 800;
  font-size: 16.5px;
  margin: 10px 0 8px;
}

.jp-center-title.big {
  font-size: 18px;
}

.jp-center-sub {
  text-align: center;
  font-weight: 700;
  margin: -4px 0 6px;
}

.jp-page-title {
  margin: 10px 0 12px;
  text-align: center;
  font-weight: 800;
  font-size: 17.5px;
}

.jp-sub-title {
  font-weight: 800;
  font-size: 14.5px;
  margin: 14px 0 8px;
}

.jp-note {
  text-align: center;
  font-size: 12.5px;
  margin: 8px 0;
}

/* ----- 1면: 표지 ----- */
.jp-issue-row {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 15px;
  padding: 0 4px 4px;
}

/* 구본 표지: 표어 회색줄 + [사진 | 교회명·연락처] */
.jp-motto {
  background: var(--jubo-gray);
  text-align: center;
  font-weight: 700;
  font-size: 13.5px;
  padding: 3px 6px;
}
.jp-motto small {
  font-weight: 400;
  font-size: 11px;
}
.jp-cover-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 16px;
  margin: 14px 0 4px;
}
.jp-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
}
.jp-cover-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 신본 표지 배너: 이미지 위에 표어 오버레이 */
.jp-cover-banner {
  position: relative;
  margin: 10px 0 4px;
  overflow: hidden;
}

.jp-cover-banner img {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.jp-cover-motto {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  gap: 4px;
  padding: 14px 20px;
  background: linear-gradient(90deg, rgba(226, 236, 248, 0.9) 0%, rgba(226, 236, 248, 0.55) 48%, rgba(226, 236, 248, 0) 78%);
}

.jp-cover-motto .jp-motto-text {
  max-width: 66%;
  font-family: "Gungsuh", "궁서", "Batang", serif;
  font-weight: 800;
  font-size: 22px;
  line-height: 1.42;
  color: #1c3d70;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.85);
}

.jp-cover-motto small {
  font-weight: 600;
  font-size: 13px;
  color: #1c3d70;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.85);
}

.jp-churchname {
  font-family: "Gungsuh", "궁서", "Batang", serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 1px;
  text-align: center;
}

.jp-ministers {
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.jp-minister strong {
  display: block;
  font-size: 13.5px;
}

/* 주의: 직접 자식만 block — 편집용 .jp-ed span은 인라인 유지 */
.jp-minister > span {
  display: block;
  padding-left: 12px;
}

.jp-minister strong .jp-ed,
.jp-minister > span .jp-ed {
  display: inline;
  padding-left: 0;
}

.jp-meetings {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 26px;
  font-size: 13px;
}

.jp-meet-head {
  font-weight: 800;
  margin: 9px 0 3px;
}

.jp-meet-item {
  padding-left: 16px;
  margin: 2px 0;
}

.jp-cover-footer {
  margin-top: 12px;
  border-top: 3px double #000000;
  padding-top: 8px;
}

/* 구본 하단: 중앙 정렬 */
.jp-cover-footer.classic {
  text-align: center;
}

.jp-cover-footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.jp-footer-church {
  text-align: center;
}

.jp-footer-contacts {
  text-align: left;
}

/* 구본 기본 크기 (중앙, 큼) */
.jp-footer-name {
  font-weight: 800;
  font-size: 16px;
  margin-top: 2px;
}

.jp-footer-line {
  font-weight: 700;
  font-size: 13px;
  margin-top: 2px;
}

/* 신본 하단 교회정보 칸: 작게 */
.jp-footer-church .jp-footer-name {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.4px;
}

.jp-footer-church .jp-footer-line {
  font-weight: 600;
  font-size: 12px;
  margin-top: 1px;
}

.jp-transport {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dotted #888888;
  text-align: left;
}

.jp-transport-label {
  flex: 0 0 auto;
  font-weight: 800;
  margin-top: 2px;
}

.jp-transport-body p {
  margin: 1px 0;
  font-size: 12.5px;
}

/* ----- 2면: 예배 순서 ----- */
.jp-verse {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 8px;
}

.jp-verse h4 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
}

.jp-verse span {
  align-self: flex-end;
  font-size: 11.5px;
  margin-top: 2px;
}

.jp-parts {
  margin: 8px 6px 14px;
}

.jp-parts-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.jp-parts-row strong {
  font-size: 13.5px;
}

/* 예배 순서표 (점선 행) */
.jp-order {
  width: 94%;
  margin: 0 auto;
  border-collapse: collapse;
}

.jp-order td {
  border-bottom: 1px dotted #999999;
  padding: 7px 4px;
  vertical-align: middle;
}

.jp-order.framed {
  border-top: 1px solid #333333;
  border-bottom: 1px solid #333333;
}

.jp-order-item {
  width: 17%;
  text-align: left;
  white-space: pre;
}

.jp-order-center {
  text-align: center;
}

.jp-order-right {
  width: 22%;
  text-align: right;
  white-space: pre;
}

.jp-bold-row td {
  font-weight: 800;
}

/* 테두리 표 공통 */
.jp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin: 6px 0;
}

.jp-table th,
.jp-table td {
  border: 1px solid #555555;
  padding: 5px 6px;
  text-align: center;
  vertical-align: middle;
}

.jp-table th {
  background: var(--jubo-gray);
  font-weight: 800;
}

.jp-td-strong {
  font-weight: 700;
}

.jp-td-left {
  text-align: left !important;
}

.jp-committee {
  margin-top: 26px;
}

/* ----- 3면 ----- */
.jp-mini {
  margin-bottom: 34px;
}

.jp-mini-info {
  margin: 6px 8px;
}

.jp-center-extra {
  text-align: center;
  margin-top: 10px;
  font-weight: 700;
}

/* ----- 4면 ----- */
.jp-sermon-body {
  padding: 4px 8px;
  min-height: 480px;
}

.jp-sermon-body p {
  margin: 0 0 14px;
}

.jp-edu-table th:nth-child(1) {
  width: 13%;
}

.jp-edu-table th:nth-child(2) {
  width: 37%;
}

/* ----- 5면 ----- */
.jp-list-line {
  margin: 3px 0;
  padding-left: 14px;
  text-indent: -14px;
}

.jp-sharing-questions .jp-question {
  margin: 0 0 10px;
  font-size: 13px;
  padding-left: 14px;
  text-indent: -14px;
}

.jp-stats-table {
  margin-top: 14px;
  font-size: 12.5px;
}

.jp-stats-title {
  font-size: 15px;
  background: var(--jubo-gray);
}

.jp-col-count {
  width: 12%;
}

.jp-td-offer {
  width: 16%;
  white-space: pre;
}

.jp-td-amount {
  width: 15%;
  text-align: right !important;
  padding-right: 12px !important;
}

.jp-td-note {
  width: 11%;
  font-size: 10.5px;
  border-left: 0 !important;
}

.jp-account {
  text-align: center;
  font-size: 12px;
  margin-top: 6px;
}

.jp-account p {
  margin: 2px 0;
}

/* ----- 6-7면: 전도회 ----- */
.jp-group {
  margin-bottom: 16px;
}

.jp-group-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-bottom: 1.5px solid #333333;
  padding-bottom: 2px;
  flex-wrap: wrap;
}

.jp-group-head strong {
  font-size: 14.5px;
}

.jp-group-head span {
  font-size: 12.5px;
}

.jp-group-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.jp-group-table td {
  border-bottom: 1px dotted #999999;
  padding: 5px 6px;
  vertical-align: top;
}

.jp-group-table .jp-group-label {
  width: 92px;
  font-weight: 700;
  white-space: nowrap;
}

.jp-group-table p {
  margin: 1px 0;
}

/* ----- 8면: 교회 소식 ----- */
.jp-notice {
  margin-bottom: 13px;
}

.jp-notice-title {
  font-weight: 800;
  font-size: 13.5px;
  margin-bottom: 2px;
}

.jp-notice-dept {
  font-size: 10.5px;
  font-weight: 400;
  color: #666666;
}

.jp-notice-body {
  padding-left: 14px;
  font-size: 13px;
}

.jp-kitchen-table {
  width: 72%;
  margin: 4px auto 10px;
}

.jp-anns {
  text-align: center;
  font-size: 12.5px;
}

.jp-ann {
  margin: 2px 0;
}

.jp-ann.bold {
  font-weight: 800;
}

.jp-ann.hl {
  font-weight: 800;
}

.jp-ann.hl {
  background: var(--jubo-lav);
  display: table;
  margin: 2px auto;
  padding: 0 8px;
}

/* =========================================================
   인라인 편집 (contenteditable) + 서식/행 툴바
   ========================================================= */

.jp-ed[contenteditable="true"] {
  min-width: 12px;
  border-radius: 2px;
  transition: background 0.12s ease;
}

.jp-ed[contenteditable="true"]:hover {
  outline: 1px dashed rgba(47, 118, 88, 0.5);
  outline-offset: 1px;
}

.jp-ed[contenteditable="true"]:focus {
  outline: 2px solid rgba(47, 118, 88, 0.75);
  outline-offset: 1px;
  background: rgba(47, 118, 88, 0.05);
}

.jp-ed[contenteditable="true"]:empty::before {
  content: attr(data-ph);
  color: #b3b8b3;
}

/* 권한 없어 잠긴 요소: 클릭하면 이유 안내 토스트 */
.jp-ed[data-lock] {
  cursor: not-allowed;
}

.jp-ed[data-lock]:hover {
  outline: 1px dashed rgba(180, 61, 56, 0.45);
  outline-offset: 1px;
}

td.jp-ed,
th.jp-ed {
  min-height: 20px;
}

/* 전도회 활동/기도 불릿 라인 */
.jp-gline {
  margin: 1px 0;
  padding-left: 13px;
  text-indent: -13px;
}

.jp-gline::before {
  content: "• ";
}

.jp-gline:empty::before {
  content: attr(data-ph);
  color: #b3b8b3;
}

/* 공지 부서 배지 (편집 모드 전용, 인쇄 디자인 아님) */
.jp-dept-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 0 8px;
  min-height: 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  vertical-align: 2px;
  cursor: pointer;
}

/* 서식 툴바 */
.fmt-toolbar,
.row-toolbar {
  position: fixed;
  z-index: 70;
  display: none;
  align-items: center;
  gap: 3px;
  padding: 5px 7px;
  border-radius: 999px;
  background: #141821;
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(23, 32, 27, 0.4);
  user-select: none;
}

.fmt-toolbar.visible,
.row-toolbar.visible {
  display: flex;
}

.fmt-toolbar {
  flex-wrap: nowrap;
}

.fmt-btn {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 5px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.fmt-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.fmt-btn.danger:hover {
  background: rgba(214, 92, 84, 0.5);
}

.fmt-dot {
  width: 18px;
  height: 18px;
  margin: 0 2px;
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  padding: 0;
}

.fmt-dot:hover {
  border-color: #ffffff;
  transform: scale(1.15);
}

.fmt-sep {
  width: 1px;
  height: 18px;
  margin: 0 4px;
  background: rgba(255, 255, 255, 0.25);
}

/* 특수문자 패널 */
.char-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  display: none;
  grid-template-columns: repeat(8, 30px);
  gap: 2px;
  padding: 8px;
  border-radius: 10px;
  background: #141821;
  box-shadow: 0 10px 26px rgba(23, 32, 27, 0.4);
}

.char-panel.open {
  display: grid;
}

.char-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 28px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #ffffff;
  font-size: 14px;
}

.char-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* 로마숫자 패널 — 폭 넓게 (I. II. …) */
.roman-panel {
  grid-template-columns: repeat(5, 34px);
}
.roman-panel .char-btn {
  width: 34px;
  font-size: 12px;
  font-weight: 700;
}

/* 성경 구절 찾아 삽입 패널 */
.bible-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  display: none;
  width: 260px;
  padding: 10px;
  border-radius: 10px;
  background: #141821;
  box-shadow: 0 10px 26px rgba(23, 32, 27, 0.4);
  z-index: 5;
}
.bible-panel.open { display: block; }
.bible-panel-row { display: flex; gap: 6px; }
.bible-panel-row input {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  background: #0f1512;
  color: #fff;
  font-size: 13px;
}
.bible-panel-opt {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 11.5px;
}
.bible-panel-msg {
  margin-top: 6px;
  min-height: 14px;
  color: #9fe0bf;
  font-size: 11.5px;
}

.inline-comments {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.inline-comment {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
}

.comment-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.comment-top strong {
  color: var(--ink);
}

.inline-comment p,
.empty-note {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.user-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.user-card {
  padding: 16px;
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  background: #e9f1eb;
  color: var(--green-dark);
  font-weight: 800;
}

.drive-box {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
}

.drive-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: var(--radius);
  background: #f3cf59;
  color: #17201b;
  font-weight: 900;
}

.drive-box span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.message-list {
  max-width: 980px;
}

.message-card {
  padding: 14px;
}

.message-card p {
  margin-top: 8px;
  line-height: 1.5;
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 8px;
  z-index: 20;
}

.toast {
  width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #141821;
  color: #ffffff;
  box-shadow: var(--shadow);
}

@media (max-width: 980px) {
  .nav-role,
  .user-chip-name {
    display: none;
  }

  .dashboard-grid,
  .workflow-grid,
  .user-grid {
    grid-template-columns: 1fr;
  }

  .sections-layout {
    grid-template-columns: 1fr;
  }

  .splitter {
    display: none;
  }

  .editor-panel {
    position: static;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topnav {
    padding: 8px 12px;
    gap: 10px;
  }

  .brand div:not(.brand-mark),
  .nav-item span:last-child {
    display: none;
  }

  .main {
    padding: 16px;
  }

  .topbar,
  .section-toolbar,
  .hero-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .progress-block {
    align-self: center;
  }

  .metric-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .pdf-frame {
    padding: 10px;
  }

  h1 {
    font-size: 1.45rem;
  }
}

/* ===== 성도용 공개 프론트 (/member) ===== */
#memberApp {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg, #eef1f0);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#memberApp[hidden] { display: none; }

/* 로그인 */
.mb-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(160deg, #2f7658 0%, #17324a 100%);
}
.mb-login-card {
  width: min(380px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 32px 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
}
.mb-login-card h2 { margin: 14px 0 4px; font-size: 1.4rem; }
.mb-sub { color: #667085; margin: 0 0 18px; font-size: 0.92rem; }
.mb-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: #17324a; }
.mb-mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: #2f7658; color: #fff; font-size: 13px; font-weight: 800;
}
.mb-input {
  width: 100%; box-sizing: border-box;
  margin: 8px 0; padding: 12px 14px;
  border: 1px solid var(--line, #d7ddda); border-radius: 10px;
  font-size: 1rem; background: #fff;
}
.mb-btn {
  width: 100%; margin-top: 8px; padding: 12px;
  border: 0; border-radius: 10px; font-size: 1rem; font-weight: 700; cursor: pointer;
}
.mb-btn.primary { background: #2f7658; color: #fff; }
.mb-hint { margin: 14px 0 0; font-size: 0.8rem; color: #98a2b3; }

/* 헤더 */
.mb-header {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: #141821; color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.mb-header .mb-brand { color: #fff; }
.mb-cname { font-size: 0.95rem; }
@media (max-width: 480px) { .mb-cname { display: none; } }
.mb-nav { display: flex; gap: 2px; margin: 0 auto; }
/* 언더바(밑줄) 탭 */
.mb-tab {
  border: 0; background: none; color: rgba(255, 255, 255, 0.6);
  padding: 12px 16px 9px; border-radius: 0; border-bottom: 3px solid transparent;
  font-size: 0.98rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.mb-tab:hover { color: #fff; }
.mb-tab.active { color: #fff; border-bottom-color: #fff; }
@media (max-width: 480px) {
  .mb-header { gap: 8px; padding: 9px 12px; }
  .mb-nav { gap: 2px; }
  .mb-tab { padding: 10px 12px 8px; font-size: 0.92rem; }
  .mb-oplogin { padding: 6px 10px; }
}
.mb-logout {
  border: 0; background: transparent; color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem; cursor: pointer; white-space: nowrap;
}
.mb-oplogin {
  border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.1); color: #fff;
  padding: 7px 13px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.mb-oplogin:hover { background: rgba(255, 255, 255, 0.2); }

.mb-main { padding: 16px; }
.mb-issue-head {
  max-width: 820px; margin: 4px auto 12px;
  font-weight: 800; font-size: 1.05rem; color: #17324a; text-align: center;
}
.mb-empty { text-align: center; color: #667085; padding: 40px 12px; }
.mb-noservice { text-align: center; color: #475569; padding: 48px 20px; max-width: 460px; margin: 24px auto; }
.mb-noservice-ico { font-size: 3rem; margin-bottom: 8px; }
.mb-noservice h3 { font-size: 1.15rem; font-weight: 800; margin: 0 0 10px; color: #1f2937; }
.mb-noservice p { line-height: 1.7; color: #667085; }

/* PPT 바로 송출 모드 */
#pptView { padding: 0; margin-top: -10px; }
.ppt-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 12px; }
.ppt-name { color: var(--muted); font-weight: 700; }
.ppt-spacer { flex: 1; }
.ppt-live { margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: rgba(220, 38, 38, 0.08); color: #b91c1c; font-weight: 700; }
.ppt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ppt-thumb { position: relative; aspect-ratio: 16 / 9; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; padding: 0; cursor: pointer; display: grid; place-items: center; }
.ppt-thumb:hover { border-color: var(--green, #2f7658); }
.ppt-thumb.cur { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.3); }
.ppt-thumb img { width: 100%; height: 100%; object-fit: contain; }
.ppt-thumb-text { padding: 8px; font-size: 0.8rem; text-align: center; color: #333; word-break: keep-all; }
/* 텍스트 슬라이드 썸네일 — 교독문 사회자/청중 색 분리 그대로 보이게 */
.ppt-thumb-body { width: 100%; max-height: 100%; padding: 8px 10px; font-size: 0.6rem; line-height: 1.35; text-align: center; color: #333; word-break: keep-all; overflow: hidden; }
.ppt-thumb-head { color: #888; font-weight: 700; margin-bottom: 0.5em; }
.ppt-thumb-body .hv-lead { color: #8f5a3c; display: block; }
.ppt-thumb-body .hv-cong { color: #38558f; display: block; margin-top: 0.6em; }
.ppt-thumb-body .hv-read { display: block; }
.ppt-thumb-body sup { font-size: 0.7em; opacity: 0.6; margin-right: 0.15em; }
.ppt-no { position: absolute; left: 6px; bottom: 6px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 0.7rem; font-weight: 800; padding: 1px 7px; border-radius: 999px; }
.ppt-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 44px; }
@media (max-width: 1100px) { .ppt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 여러 파일 탭 (PPT / 동영상) */
.ppt-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 14px; border-bottom: 2px solid var(--line); padding-bottom: 10px; }
.ppt-tab { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card, #fff); color: var(--text, #222); font-weight: 700; cursor: pointer; max-width: 260px; }
.ppt-tab:hover { border-color: var(--green, #2f7658); }
.ppt-tab.active { background: var(--green, #2f7658); color: #fff; border-color: var(--green, #2f7658); }
.ppt-tab-ico { font-size: 1rem; line-height: 1; }
.ppt-tab-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ppt-tab-live { color: #dc2626; font-size: 0.7rem; line-height: 1; }
.ppt-tab.active .ppt-tab-live { color: #fff; }
.ppt-tab-x { margin-left: 2px; opacity: 0.5; font-size: 0.78rem; border-radius: 50%; width: 18px; height: 18px; display: inline-grid; place-items: center; }
.ppt-tab-x:hover { opacity: 1; background: rgba(220, 38, 38, 0.9); color: #fff; }
.ppt-tab-dday { font-size: 0.64rem; font-weight: 800; color: #b45309; background: rgba(245, 158, 11, 0.18); border-radius: 999px; padding: 1px 6px; }
.ppt-tab.active .ppt-tab-dday { color: #fff; background: rgba(255, 255, 255, 0.25); }
.ppt-note { margin: 0 0 12px; color: var(--muted); font-size: 0.82rem; }
.ppt-videowrap { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.ppt-videoprev { max-width: 100%; width: 760px; max-height: 60vh; background: #000; border-radius: 10px; }
.ppt-videoact { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* 언더바(밑줄) 탭 — 예배 / 내가올림 / 아이템 3단 */
.pd-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 2px solid var(--line); }
.pd-tab { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border: 0; background: none; color: var(--muted); font-weight: 700; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.pd-tab:hover { color: var(--text, #222); }
.pd-tab.active { color: var(--green, #2f7658); border-bottom-color: var(--green, #2f7658); }
.pd-tabs-svc { margin-top: 0; }
.pd-tabs-svc .pd-tab { font-size: 1.02rem; padding: 8px 18px; }
.pd-tabs-sub { border-bottom: 1px solid var(--line); margin-top: 12px; }
.pd-tabs-sub .pd-tab { font-size: 0.92rem; cursor: default; color: var(--green, #2f7658); border-bottom-color: var(--green, #2f7658); }
.pd-tabs-item { margin-top: 12px; }
.pd-tab-n { background: var(--line); color: var(--muted); border-radius: 999px; font-size: 0.66rem; padding: 0 6px; margin-left: 2px; }
.pd-tab.active .pd-tab-n { background: var(--green, #2f7658); color: #fff; }
.pd-tab-ico { font-size: 0.95rem; line-height: 1; }
.pd-tab.active .ppt-tab-dday { color: #fff; background: var(--green, #2f7658); }
.pd-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.pd-toolbar .live-send { background: #dc2626; color: #fff; border-color: #dc2626; }
.pd-toolbar .live-send:hover { background: #b91c1c; }
.pd-combobar:empty { display: none; }
/* 성경/찬송/복음송/교독문 콤보바 — 툴바에 인라인, 버튼이 교독문 바로 뒤에 붙어 같이 리스폰스 */
.pd-combobar { flex: 0 1 auto; min-width: 0; }
.pd-toolbar { align-items: center; gap: 8px; }
/* 평범한 테두리 버튼 (아이콘 없음, 볼드 없음) */
.pd-btn { padding: 7px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--card, #fff); color: var(--text, #222); font-weight: 500; font-size: 0.88rem; cursor: pointer; white-space: nowrap; }
.pd-btn:hover { border-color: var(--green, #2f7658); color: var(--green, #2f7658); }
.pd-btn-send { border-color: var(--green, #2f7658); color: var(--green, #2f7658); }
.pd-btn-send:hover { background: var(--green, #2f7658); color: #fff; }
/* 자동완성 지우기(✕) */
.pdc-ac { position: relative; }
.pdc-ac .hv-combo-input { padding-right: 26px; }
.pdc-ac-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); z-index: 2; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted, #888); font-size: 0.72rem; cursor: pointer; display: grid; place-items: center; }
.pdc-ac-clear:hover { background: rgba(120, 120, 120, 0.2); color: var(--text, #222); }
.pdc-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pdc-label { font-weight: 800; color: var(--muted); font-size: 0.86rem; white-space: nowrap; }
.pdc-sel, .pdc-num, .pdc-input-sm, .pdc-book { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card, #fff); color: var(--text, #222); font-size: 0.86rem; }
.pdc-book { width: 104px; }
.pdc-num { width: 78px; }
.pdc-input-sm { width: 150px; }
.pdc-tilde { color: var(--muted); font-weight: 700; }
.pdc-sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; }
.pdc-spacer { flex: 1; min-width: 8px; }

/* 주보 열람 — 페이지를 폭에 맞춰 축소 */
.mb-bulletin {
  max-width: 820px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.mb-pdf {
  display: block; width: 100%; max-width: 900px; margin: 0 auto;
  height: calc(100vh - 150px); min-height: 460px;
  border: 0; border-radius: 10px; background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.mb-bulletin .jubo-page {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-width: 100%;
}
/* 좁은 화면에서 A4 폭이 넘치면 가로 스크롤 대신 축소 */
@media (max-width: 840px) {
  .mb-bulletin { zoom: 0.62; }
}
@media (max-width: 560px) {
  .mb-bulletin { zoom: 0.44; }
}

/* 예배 슬라이드 열람 */
.mb-svc-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  max-width: 820px; margin: 0 auto 16px;
}
.mb-svc {
  border: 1px solid var(--line, #d7ddda); background: #fff; color: #17324a;
  padding: 8px 14px; border-radius: 999px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
}
.mb-svc.active { background: #2f7658; color: #fff; border-color: #2f7658; }
.mb-count {
  font-size: 0.72rem; background: rgba(0, 0, 0, 0.12); border-radius: 999px; padding: 1px 7px;
}
.mb-svc.active .mb-count { background: rgba(255, 255, 255, 0.22); }
.mb-slides {
  max-width: 820px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px;
}
.mb-slide {
  aspect-ratio: 16 / 9;
  border-radius: 10px; overflow: hidden;
  container-type: size;
  position: relative;
  background: #f0f0f0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.mb-slide .hv-stage {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 6% 4%; text-align: center; word-break: keep-all;
}
.mb-slide .hv-stage.image { padding: 0; }
.mb-slide .hv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; } /* 잘리지 않고 들어오게 */
.mb-slide .hv-stage-inner { width: 100%; height: 100%; }

/* ===== 드래그앤드롭 업로드 오버레이 ===== */
.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(23, 50, 74, 0.55);
  backdrop-filter: blur(2px);
}
.drop-overlay.visible { display: grid; }
.drop-overlay-card {
  pointer-events: none;
  width: min(560px, 90%);
  padding: 44px 28px;
  border: 3px dashed rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  background: rgba(47, 118, 88, 0.9);
  color: #fff;
  text-align: center;
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1.5;
}
.drop-overlay-card .drop-ico { font-size: 3rem; margin-bottom: 10px; }

/* ===== 성도용 성경 검색·열람 ===== */
.mb-search { max-width: 780px; margin: 0 auto; }
.mb-search-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 12px; background: #fff; border: 1px solid var(--line, #d7ddda);
  border-radius: 14px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
.mb-ver {
  font-weight: 800; color: #2f7658; background: rgba(47, 118, 88, 0.1);
  padding: 6px 12px; border-radius: 999px; font-size: 0.9rem;
}
.mb-sel {
  padding: 10px 12px; border: 1px solid var(--line, #d7ddda); border-radius: 10px;
  font-size: 1rem; background: #fff; min-width: 96px;
}
.mb-sel.sm { min-width: 68px; }
.mb-tilde { color: #98a2b3; }
.mb-search-bar .mb-btn { width: auto; margin: 0; padding: 10px 20px; }
.mb-result { margin-top: 16px; }
.mb-passage {
  background: #fff; border: 1px solid var(--line, #d7ddda); border-radius: 14px;
  padding: 18px 20px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}
.mb-passage-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-weight: 800; color: #17324a; margin-bottom: 12px;
  border-bottom: 1px solid var(--line, #eef1f0); padding-bottom: 10px;
}
.mb-passage-head small { color: #98a2b3; font-weight: 600; }
.mb-big-btn {
  border: 1px solid var(--line, #d7ddda); background: #fff; color: #17324a;
  padding: 6px 12px; border-radius: 999px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.mb-verse { margin: 8px 0; line-height: 1.85; font-size: 1.08rem; color: #1f2933; word-break: keep-all; }
.mb-verse b { color: #2f7658; margin-right: 6px; font-size: 0.82em; vertical-align: 2px; }

/* 크게 보기 (예배 중 읽기용 전체화면) */
.mb-reader {
  position: fixed; inset: 0; z-index: 700;
  background: #0f1720; color: #fff; overflow-y: auto; padding: 56px 22px 40px;
}
.mb-reader[hidden] { display: none; }
.mb-reader-close {
  position: fixed; top: 14px; right: 16px; z-index: 2;
  width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.15); color: #fff; font-size: 20px; cursor: pointer;
}
.mb-reader-inner { max-width: 760px; margin: 0 auto; }
.mb-reader-head { font-weight: 800; font-size: 1.4rem; color: #7fd4a8; margin-bottom: 20px; text-align: center; }
.mb-reader-inner p { font-size: 1.5rem; line-height: 1.9; margin: 14px 0; word-break: keep-all; }
.mb-reader-inner p b { color: #7fd4a8; font-size: 0.7em; margin-right: 8px; vertical-align: 3px; }

.mb-ver-sel { font-weight: 800; color: #2f7658; border-color: #2f7658; min-width: 110px; }
.mb-reader-ver { font-size: 0.7em; color: #9bb0c4; margin-left: 8px; }

/* 성경 대역(이중문단) — 한글 위 / 영어 아래 */
.mb-dual-sel { color: #6954a8; border-color: #b9aee0; font-weight: 700; }
.mb-verse-grp { margin: 10px 0; padding-bottom: 8px; border-bottom: 1px dashed #eef1f0; }
.mb-verse-grp:last-child { border-bottom: 0; }
.mb-verse-grp .mb-verse { margin: 2px 0; }
.mb-verse-2 {
  color: #5b6b7d; font-style: normal; font-size: 0.98rem;
  padding-left: 20px; line-height: 1.7;
}
.mb-verse-2::before { content: "﹂ "; color: #b9aee0; }
.mb-reader-grp { margin: 16px 0; }
.mb-reader-2 { color: #9bb0c4 !important; font-size: 1.15rem !important; padding-left: 24px; }
.mb-reader-2::before { content: "﹂ "; color: #6f8296; }

/* 상단 역본 선택기 */
.hv-ver-sel { font-weight: 700; min-width: 88px; }

/* 2개 이상 준비 시 하나 고르는 팝업 */
.hv-pick-popup {
  position: fixed; inset: 0; z-index: 320;
  display: grid; place-items: center;
  background: rgba(15, 22, 30, 0.5);
}
.hv-pick-popup[hidden] { display: none; }
.hv-pick-card {
  width: min(420px, calc(100vw - 40px));
  background: var(--surface, #fff); border-radius: 16px;
  padding: 24px 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  text-align: center;
}
.hv-pick-card h3 { margin: 0 0 4px; }
.hv-pick-card p { margin: 0 0 16px; color: var(--muted, #667085); font-size: 0.9rem; }
.hv-pick-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 12px; }
.hv-pick-btns .primary-button { flex: 1 1 40%; min-width: 120px; }

/* ===== 성도용 예배: 실시간 / 자유 열람 ===== */
.mb-mode { display: flex; gap: 4px; justify-content: center; max-width: 820px; margin: 0 auto 14px; border-bottom: 2px solid var(--line, #e2e6e4); }
.mb-mode-btn {
  border: 0; background: none; color: #98a2b3;
  padding: 10px 18px; border-radius: 0; border-bottom: 3px solid transparent; margin-bottom: -2px;
  font-weight: 800; cursor: pointer;
}
.mb-mode-btn:hover { color: #17324a; }
.mb-mode-btn.active { color: #17324a; border-bottom-color: #17324a; }
.mb-tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; margin-left: 6px; border-radius: 999px; background: #2f7658; color: #fff; font-size: 0.74rem; font-weight: 800; line-height: 1; vertical-align: middle; }
.mb-browse-hint { text-align: center; color: #98a2b3; font-size: 0.85rem; margin: 0 0 10px; }

/* 실시간 따라보기 — 큰 현재 슬라이드 */
.mb-live { max-width: 820px; margin: 0 auto; }
.mb-live-slide {
  aspect-ratio: 16 / 9; container-type: size; position: relative;
  border-radius: 14px; overflow: hidden; background: #0f1720;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.mb-live-slide .hv-stage { position: absolute; inset: 0; display: grid; place-items: center; padding: 5% 4%; text-align: center; word-break: keep-all; }
.mb-live-slide .hv-stage.image { padding: 0; }
.mb-live-slide .hv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; } /* 악보 전체가 잘리지 않고 들어오게 */
.mb-live-slide .hv-stage-inner, .mb-viewer-stage .hv-stage-inner { width: 100%; height: 100%; } /* 이미지가 0×0으로 안 보이던 문제 해결 */
.mb-live-meta { text-align: center; color: #667085; font-weight: 700; margin-top: 10px; }
/* 텍스트 슬라이드(성경·교독문)는 흰 배경 + 진한 글씨 (어두운 배경에 안 보이던 검은 화면 해결) */
.mb-live-slide .hv-stage:not(.image),
.mb-slide .hv-stage:not(.image),
.mb-viewer-stage .hv-stage:not(.image) { background: #fff; }
.mb-live-slide .hv-body, .mb-slide .hv-body, .mb-viewer-stage .hv-body { color: #17324a; font-weight: 700; line-height: 1.5; }
.mb-live-slide .hv-head, .mb-slide .hv-head, .mb-viewer-stage .hv-head { color: #6b7280; }
.mb-live-slide .hv-body { font-size: 5cqw; }
.mb-live-slide .hv-head { font-size: 2.8cqw; margin-bottom: 0.7em; }
.mb-slide .hv-body { font-size: 6cqw; }
.mb-slide .hv-head { font-size: 3.2cqw; margin-bottom: 0.5em; }
.mb-viewer-stage .hv-body { font-size: 4.6cqw; }
.mb-viewer-stage .hv-head { font-size: 2.6cqw; margin-bottom: 0.7em; }

/* 가로(landscape) — 슬라이드를 화면 가득 크게 */
@media (orientation: landscape) and (max-height: 600px) {
  .mb-header { padding: 6px 12px; }
  .mb-main { padding: 8px; }
  .mb-mode { margin-bottom: 6px; }
  .mb-live { max-width: min(100%, calc((100vh - 92px) * 16 / 9)); }
  .mb-live-meta { margin-top: 4px; font-size: 0.85rem; }
}
.mb-slide[data-mb-slide] { cursor: pointer; }

/* 자유 열람 전체화면 뷰어 */
.mb-viewer {
  position: fixed; inset: 0; z-index: 720; background: #0b1017;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px;
}
.mb-viewer[hidden] { display: none; }
.mb-viewer-stage {
  width: 100%; aspect-ratio: 16 / 9; max-height: 82vh;
  container-type: size; position: relative; background: #0f1720; border-radius: 12px; overflow: hidden;
  justify-self: center;
}
.mb-viewer-stage .hv-stage { position: absolute; inset: 0; display: grid; place-items: center; padding: 5% 4%; text-align: center; word-break: keep-all; }
.mb-viewer-stage .hv-stage.image { padding: 0; }
.mb-viewer-stage .hv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.mb-viewer-stage .hv-stage-inner { width: 100%; height: 100%; }
.mb-viewer-nav {
  width: 56px; height: 100%; border: 0; background: transparent; color: rgba(255,255,255,0.5);
  font-size: 48px; font-weight: 900; cursor: pointer;
}
.mb-viewer-nav:active { color: #fff; }
.mb-viewer-close {
  position: fixed; top: 14px; right: 16px; z-index: 2; width: 42px; height: 42px;
  border: 0; border-radius: 50%; background: rgba(255,255,255,0.14); color: #fff; font-size: 20px; cursor: pointer;
}
.mb-viewer-meta { position: fixed; bottom: 16px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,0.7); font-weight: 700; }

/* 편집 잠금 배너 (읽기전용 / 권한요청) — 하단 고정 */
.edit-lock-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 4000;
  display: none; align-items: center; justify-content: center; gap: 14px;
  padding: 9px 16px; font-weight: 700; font-size: 14px;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.18);
}
.edit-lock-bar.show { display: flex; }
.edit-lock-bar.readonly { background: #fde68a; color: #7c2d12; }
.edit-lock-bar.request { background: #bfdbfe; color: #1e3a8a; }
.edit-lock-bar .lock-btn {
  border: 0; border-radius: 8px; padding: 6px 16px;
  font-weight: 800; cursor: pointer; background: #17324a; color: #fff;
}
.edit-lock-bar .lock-btn:hover { background: #244766; }
.edit-lock-bar .lock-note { font-weight: 600; opacity: 0.85; }
body.is-readonly [data-edit], body.is-readonly [data-deck-edit] { cursor: default; }
body.is-readonly [data-edit]:hover { outline: none !important; }

/* 운영자 로그인 — 우측 상단 버튼 + 팝업 */
.op-login-btn {
  height: 36px; padding: 0 16px; border: 0; border-radius: 8px;
  background: #e7c98f; color: #4a3410; font-size: 0.9rem; font-weight: 800; cursor: pointer;
}
.op-login-btn:hover { background: #f0d6a3; }
.op-login-btn[hidden] { display: none; }
.op-login-pop {
  position: fixed; z-index: 6000; width: 240px; padding: 16px;
  background: #fff; border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  display: grid; gap: 9px;
}
.op-login-title { font-weight: 800; font-size: 14px; color: #17324a; margin-bottom: 2px; }
.op-login-pop input { padding: 10px 12px; border: 1px solid #d8d8d8; border-radius: 8px; font-size: 14px; }
.op-login-go { width: 100%; padding: 10px; }
.op-login-msg { margin: 0; min-height: 14px; font-size: 12px; color: #c0392b; }
/* 비로그인(공개 읽기전용)에선 편집·관리 컨트롤 숨김 */
body.not-operator #addTenantBtn { display: none; }

/* 설정 — GPS 위치 제한 */
.gps-field { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 8px; }
.gps-field > label:first-child { font-weight: 800; font-size: 0.92rem; color: #17324a; }
.gps-check { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; }
.gps-field input[type="text"] { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.gps-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gps-controls label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.gps-controls input[type="number"] { width: 82px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; font: inherit; }
#gpsStatus { margin: 0; min-height: 16px; }

/* 성경 대역 — 절 아래 영어 (미리보기·그리드·성도용) */
.hv-v-en { display: block; font-size: 0.6em; opacity: 0.8; margin-top: 0.12em; font-weight: 400; }

/* 교독문(사회자/회중) — 미리보기·그리드·성도용. 투사창은 projShell 인라인 스타일에 동일 규칙 */
.hv-read { display: block; }
.hv-lead { color: #8f5a3c; }
.hv-cong { color: #38558f; margin-top: 1.4em; }
.hv-read-title { color: #c2410c; font-weight: 900; }
