/* 주보 — 교회 HWP 주보를 옮긴 인쇄용(.bx-sheet), 모바일 주보(.bx-m), 입력 + 실시간 미리보기(.bx-ed) */

/* ───────── 입력 화면 ───────── */
.content.bx-wide { max-width: 1640px; }
.bx-ed { display: block; }
.bx-pane-tabs { position: sticky; top: 60px; z-index: 6; background: var(--bg); padding: 8px 0; margin-bottom: 8px; }
.bx-pane-tabs span, .bx-pv-tabs span { font-size: 1.05rem; gap: 6px; }
.bx-pane-tabs svg { width: 20px; height: 20px; }
@media (max-width: 1199px) {
  .bx-ed[data-pane="form"] .bx-pv { display: none; }
  .bx-ed[data-pane="preview"] .bx-form { display: none; }
}
@media (min-width: 1200px) {
  .bx-pane-tabs { display: none; }
  .bx-ed { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .bx-pv { position: sticky; top: 72px; max-height: calc(100vh - 150px); overflow-y: auto; border-radius: var(--radius); }
}
.bx-pv { background: #E7EDF2; border-radius: var(--radius); padding: 12px; }
.bx-pv-tabs { margin-bottom: 12px; position: sticky; top: 0; z-index: 2; background: #E7EDF2; padding-bottom: 4px; }
.bx-phone { max-width: 430px; margin: 0 auto; }
.bx-pv-sheets { padding: 0; background: none; }
.bx-pv-sheets .sheet { margin-bottom: 10px; }

.bx-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.bx-nav button, .bx-jump button { min-height: 44px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); font: inherit; font-size: .95rem; cursor: pointer; color: var(--text); }
.bx-nav button:hover, .bx-jump button:hover { background: var(--primary-softer); border-color: var(--primary); }
.bx-card { scroll-margin-top: 130px; }
.bx-card h2 { display: flex; align-items: center; gap: 6px; font-size: 1.25rem; }
.bx-card h2 svg { width: 20px; height: 20px; color: var(--warn); }
.bx-h3 { font-size: 1.05rem; margin: 6px 0 8px; }
.bx-f { display: block; margin-bottom: 12px; }
.bx-l { display: block; font-weight: 700; margin-bottom: 5px; font-size: 1rem; }
.bx-l small { font-weight: 400; color: var(--muted, #5B7286); }
.bx-f .input { min-height: 52px; font-size: 1.08rem; }
.bx-f textarea.input { min-height: 0; line-height: 1.6; }
.bx-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.bx-row { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--primary-softer); }
.bx-c { flex: 2 1 180px; min-width: 0; }
.bx-c.narrow { flex: 1 1 110px; }
.bx-c.wide { flex: 1 1 100%; }
.bx-c .bx-f { margin-bottom: 0; }
.bx-rbtn { display: flex; gap: 4px; margin-left: auto; }
.bx-rbtn .icon-btn { width: 44px; height: 44px; border: 1px solid var(--border-strong); background: var(--surface); }
.bx-rbtn .icon-btn[disabled] { opacity: .35; cursor: default; }
.bx-ord-x { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1 1 100%; }
.bx-stand { min-height: 44px; padding: 0 8px 0 0; align-items: center; }
.bx-stand input { margin-top: 0; }
.bx-add { width: 100%; min-height: 52px; border-style: dashed; }
.bx-danger { justify-content: space-between; margin: 8px 0 20px; }
.bx-save { position: sticky; bottom: calc(var(--bottom-h) + 10px); z-index: 15; display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  background: rgba(255, 255, 255, .96); border: 1px solid var(--border-strong); border-radius: 16px; padding: 10px 12px 10px 16px; box-shadow: 0 6px 24px rgba(24, 53, 74, .14); margin-top: 12px; }
.bx-save #save-state { flex: 1; color: var(--muted, #5B7286); }
.bx-save #save-state.warn { color: var(--danger); font-weight: 700; }
.bx-save .btn { min-width: 120px; min-height: 52px; font-size: 1.08rem; }
@media (min-width: 960px) { .bx-save { bottom: 14px; } }

/* ───────── 모바일 주보 ───────── */
.bx-jump { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.bx-jump button { flex: none; }
.bx-m { font-size: 1.05rem; }
.bx-m-sec { scroll-margin-top: 70px; }
.bx-m-motto { text-align: center; margin: 14px 4px 4px; padding: 12px 10px; border-top: 1px solid rgba(168, 137, 78, .45); border-bottom: 1px solid rgba(168, 137, 78, .45); }
.bx-m-motto b { display: block; font-size: .8rem; letter-spacing: .2em; color: var(--gold); }
.bx-m-motto p { margin: 4px 0; font-weight: 700; font-size: 1.08rem; line-height: 1.55; }
.bx-m-motto small { display: block; color: #5A6775; font-size: .86rem; line-height: 1.6; }
.bx-m-lead { text-align: center; color: #5A6775; margin: -4px 0 6px; font-size: .95rem; }
.bx-m .bl-order li { flex-wrap: wrap; }
.bx-m .bl-order li.bx-long .d { flex: 1 1 100%; max-width: none; text-align: right; padding-left: 1.4em; margin-top: 2px; font-weight: 600; }
.bx-m-news { margin: 0; padding-left: 1.6em; line-height: 1.8; }
.bx-m-news li { padding: 4px 0; }
.bx-m-news li::marker { color: var(--gold); font-weight: 700; }
.bx-m-new { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bx-m-new h4, .bx-m-sub { font-size: .85rem; letter-spacing: .12em; color: var(--gold); margin: 0 0 6px; font-family: var(--serif); }
.bx-m-sub { margin-top: 10px; }
.bx-m-new ul { list-style: none; margin: 0; padding: 0; }
.bx-m-new li { padding: 6px 0; border-bottom: 1px dotted rgba(28, 43, 58, .25); }
.bx-m-new li span { display: block; font-size: .85rem; color: #5A6775; }
.bx-m-ctitle { text-align: center; font-family: var(--serif); font-size: 1.15rem; margin: 0 0 10px; line-height: 1.5; }
.bx-m-svcs { display: grid; gap: 12px; }
.bx-m-svc { border: 1px solid rgba(168, 137, 78, .35); border-radius: 8px; padding: 10px 12px; background: rgba(255, 255, 255, .55); }
.bx-m-svc h4 { margin: 0; font-family: var(--serif); font-size: 1.05rem; }
.bx-m-svc .meta { margin: 2px 0 4px; color: #5A6775; font-size: .9rem; }
.bx-m-svc .bl-text { line-height: 1.75; font-size: .95rem; }
.bx-m-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.bx-m-kv dt { font-weight: 700; white-space: nowrap; }
.bx-m-kv dd { margin: 0; color: #3D4C5B; overflow-wrap: anywhere; }
.bx-m-off dt::before { content: '【'; color: var(--gold); } .bx-m-off dt::after { content: '】'; color: var(--gold); }
.bx-m-groups { list-style: none; margin: 0; padding: 0; }
.bx-m-groups li { padding: 8px 0; border-bottom: 1px dotted rgba(28, 43, 58, .25); }
.bx-m-groups b { display: block; }
.bx-m-groups .sub { display: block; font-size: .85rem; color: var(--gold); }
.bx-m-locked { margin-top: 18px; }
@media (max-width: 380px) { .bx-m-new { grid-template-columns: 1fr; } }

/* ───────── 인쇄용 주보 (HWP 배치: 칸을 네모 테두리로 묶는 방식) ───────── */
.bx-sheet { font-family: var(--serif); line-height: 1.5; }
.bx-sheet .bx-panel { gap: 2.4mm; }
.bx-p { border: .3mm solid #222; padding: 2mm 2.4mm; }
.bx-p-h { text-align: center; font-weight: 700; font-size: 1.12em; letter-spacing: .3em; margin: -.5mm 0 1.4mm; padding-bottom: .8mm; border-bottom: .2mm solid #222; }
.bx-t { width: 100%; border-collapse: collapse; }
.bx-t th, .bx-t td { vertical-align: top; padding: .5mm .8mm; text-align: left; }
.bx-t .sl { width: 3mm; text-align: center; color: #333; }
.bx-serv th { white-space: nowrap; letter-spacing: .1em; width: 1%; }
.bx-serv-box { flex: 0 0 auto; }
.bx-text { white-space: pre-wrap; }
.bx-center { text-align: center; }
/* 표지 */
.bx-cover { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 2.6mm; position: relative; }
.bx-founded { position: absolute; top: 0; right: 0; font-size: .85em; }
.bx-cover img { width: 30%; margin-bottom: 2mm; }
.bx-dn { font-size: 1em; letter-spacing: .35em; }
.bx-nm { font-size: 2.3em; font-weight: 700; letter-spacing: .12em; line-height: 1.2; }
.bx-pastor { font-size: 1.05em; letter-spacing: .1em; }
.bx-date { font-size: 1.15em; font-weight: 700; margin-top: 4mm; padding: 1mm 4mm; border-top: .2mm solid #222; border-bottom: .2mm solid #222; }
.bx-addr { margin-top: auto; font-size: .85em; line-height: 1.6; }
/* 표어·칼럼 */
.bx-motto { border: .3mm solid #222; padding: 1.6mm 2.4mm; text-align: center; }
.bx-motto .v { font-size: .88em; margin-top: .6mm; }
.bx-col { border-top: .25mm dashed #555; padding-top: 1.6mm; }
.bx-col-t { font-weight: 700; font-size: 1.08em; margin-bottom: 1mm; }
.bx-col .bx-text { font-size: .94em; line-height: 1.55; }
.bx-sched { border: .3mm solid #222; }
.bx-sched td { width: 50%; border: .2mm solid #555; text-align: center; padding: .8mm; }
/* 교회소식·새가족 */
.bx-news-h { text-align: center; font-weight: 700; letter-spacing: .15em; margin-bottom: .8mm; }
.bx-news ol { margin: 0; padding-left: 1.4em; list-style: decimal; }
.bx-news li::marker { content: counter(list-item) ") "; }
.bx-new-h { text-align: center; font-weight: 700; letter-spacing: .1em; margin-bottom: .8mm; }
.bx-new-t { border: .3mm solid #222; table-layout: fixed; }
.bx-new-t th, .bx-new-t td { border: .2mm solid #555; text-align: center; padding: .5mm; min-height: 4mm; height: 4.4mm; }
.bx-new-t th { font-weight: 700; background: #F2F2F2; }
/* 오전예배 순서 */
.bx-arrow { font-weight: 700; font-size: 1.1em; }
.bx-order { border: .3mm solid #222; padding: 1.6mm 2mm; }
.bx-order .bx-arrow { text-align: center; }
.bx-order-sub { display: flex; justify-content: space-between; gap: 2mm; margin: .6mm 0 1mm; font-size: .95em; }
.bx-ord th { font-weight: 700; letter-spacing: .25em; white-space: nowrap; width: 1%; }
.bx-ord .st { width: 3mm; text-align: center; padding-right: 0; }
.bx-ord .dt .who { float: right; padding-left: 2mm; }
.bx-ord tr.note td, .bx-ord tr.note th { border-top: .2mm dotted #555; padding-top: .8mm; }
/* 그 밖의 예배 (HWP처럼 두 단) */
.bx-svcs { column-count: 2; column-gap: 3mm; }
.bx-svc { break-inside: avoid; border: .3mm solid #222; padding: 1.4mm 1.8mm; margin-bottom: 2.4mm; }
.bx-svc-m { font-size: .92em; margin: .4mm 0 .8mm; display: flex; justify-content: space-between; gap: 1.5mm; flex-wrap: wrap; }
.bx-svc .bx-text { font-size: .94em; line-height: 1.5; }
/* 예물·목장·전도 */
.bx-off div { padding: .3mm 0; }
.bx-groups .bx-dbl { text-align: center; font-weight: 700; margin: .6mm 0 1mm; }
.bx-groups > div:not(.bx-dbl) { padding: .3mm 0; }
.bx-sheet.text-only .bx-p, .bx-sheet.text-only .bx-order, .bx-sheet.text-only .bx-svc, .bx-sheet.text-only .bx-motto { border-color: transparent; }

@media print {
  .bx-save, .bx-pane-tabs, .bx-jump { display: none !important; }
}
