/* ============ HOLYLIGHT — 클로드 디자인 시안 기반 (Pretendard · 웜블랙 · 레드) ============ */

/* ---------- 폰트 ---------- */
@font-face { font-family: Pretendard; font-weight: 400; font-display: swap; src: local('Pretendard Regular'), url("/fonts/pretendard-400.woff2") format('woff2'); }
@font-face { font-family: Pretendard; font-weight: 500; font-display: swap; src: local('Pretendard Medium'), url("/fonts/pretendard-500.woff2") format('woff2'); }
@font-face { font-family: Pretendard; font-weight: 600; font-display: swap; src: local('Pretendard SemiBold'), url("/fonts/pretendard-600.woff2") format('woff2'); }
@font-face { font-family: Pretendard; font-weight: 700; font-display: swap; src: local('Pretendard Bold'), url("/fonts/pretendard-700.woff2") format('woff2'); }
@font-face { font-family: Pretendard; font-weight: 800; font-display: swap; src: local('Pretendard ExtraBold'), url("/fonts/pretendard-800.woff2") format('woff2'); }

:root {
  --black: #201E1D;        /* 웜 블랙 (히어로/로고/다크 버튼) */
  --ink: #201E1D;          /* 제목 텍스트 */
  --text: #3F3B39;         /* 본문 텍스트 */
  --muted: #7A7674;
  --faint: #A6A29F;
  --line: #EAE8E7;
  --line2: #DEDBD9;
  --bg: #F3F2F2;
  --card: #ffffff;
  --accent: #EC3013;       /* 레드 — 유일한 강조색 */
  --accent-tint: #FBE7E2;
  --accent-line: #F6C9BF;
  --accent-deep: #9A5040;
  --danger: #EC3013;
  --level-mid: #54504E;
  --viewer-bg: #1A1817;
  --type-worship: #EC3013;
  --type-ensemble: #201E1D;
  --type-practice: #A6A29F;
  --type-etc: #5A5654;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(32,30,29,.04);
  --shadow-pop: 0 18px 40px -24px rgba(32,30,29,.55);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.grow { flex: 1; min-width: 0; }
html { font-size: 16px; }
body {
  font-family: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100dvh;
  letter-spacing: -.01em;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { touch-action: manipulation; } /* iOS 탭 지연/무시 방지 (더블탭 줌 비활성) */
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); }

/* ---------- 브랜드 로고 (mask — 색은 color로) ---------- */
.wordmark {
  display: inline-block; background: currentColor;
  -webkit-mask: url(/img/wordmark.svg) no-repeat center / contain;
          mask: url(/img/wordmark.svg) no-repeat center / contain;
  aspect-ratio: 928 / 236;
}
.brandmark {
  display: inline-block; background: currentColor;
  -webkit-mask: url(/img/mark.svg) no-repeat center / contain;
          mask: url(/img/mark.svg) no-repeat center / contain;
  aspect-ratio: 1;
}

/* ---------- 부팅 스플래시 (플랫 — 그라데이션·글로우 없음) ---------- */
.boot-splash {
  min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 26px;
  background: var(--black);
}
.boot-logo { display: none; }
.boot-wordmark { width: min(340px, 64vw); height: auto; color: #fff; }
.boot-verse { color: #A6A29F; font-size: .9rem; letter-spacing: .01em; }
.boot-bar { width: 160px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.14); overflow: hidden; }
.boot-bar::after { content: ''; display: block; width: 45%; height: 100%; border-radius: 2px; background: var(--accent); animation: boot-slide 1.1s ease-in-out infinite; }
@keyframes boot-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(340%); } }

/* ---------- 상단 헤더 (화이트) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--card); color: var(--ink);
  display: flex; align-items: center; gap: 12px;
  padding: 12px clamp(16px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
}
.topbar .logo { display: none; }
.topbar .wordmark { width: 118px; color: var(--ink); flex: none; cursor: pointer; }
.topbar .grow { flex: 1; }
.nav-tabs { display: none; }
.bottomnav { display: none; }
.icon-sq {
  position: relative; width: 40px; height: 40px; border-radius: 13px; border: 0; cursor: pointer;
  display: grid; place-items: center; font-size: 1.02rem; flex: none;
  background: #F3F2F2; color: var(--ink);
  transition: transform .12s ease;
}
.icon-sq:active { transform: scale(.94); }
.icon-sq.dark { background: var(--black); color: #fff; }
.bell-btn { position: relative; border: 0; background: #F3F2F2; color: var(--text); width: 40px; height: 40px; border-radius: 13px; cursor: pointer; flex: none; display: grid; place-items: center; }
.bell-btn svg { display: block; }
.bell-badge {
  position: absolute; top: -4px; right: -4px; background: var(--accent); color: #fff;
  font-size: .62rem; font-weight: 800; min-width: 17px; height: 17px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
}
.user-chip { display: flex; align-items: center; border: 0; cursor: pointer; background: none; padding: 0; border-radius: 50%; }
.topbar .bell-btn { margin-right: 8px; }
/* 메뉴(☰) 버튼 위 알림 배지 */
.menu-badge {
  position: absolute; top: -5px; right: -5px; background: var(--accent); color: #fff;
  font-size: .6rem; font-weight: 800; min-width: 16px; height: 16px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
  box-shadow: 0 0 0 2px var(--card);
}
.menu-notif-btn { position: relative; }

/* ---------- 채팅 리스트 (카톡식) ---------- */
.chat-list { display: flex; flex-direction: column; }
.chat-lrow {
  display: flex; align-items: center; gap: 12px; padding: 13px 6px; border: 0; background: none;
  cursor: pointer; text-align: left; border-bottom: 1px solid var(--line); width: 100%;
}
.chat-lrow:active { background: var(--bg); }
.chat-ic, .chat-ic-img { width: 46px; height: 46px; border-radius: 15px; flex: none; }
.chat-ic { display: grid; place-items: center; font-size: 1.3rem; background: var(--bg); }
.chat-ic.team { background: var(--accent); }
.chat-ic-img { object-fit: cover; }
.chat-lbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.chat-ltop { display: flex; align-items: center; gap: 6px; }
.chat-ltop b { font-size: .95rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-tag { font-size: .6rem; font-weight: 700; color: var(--accent); background: var(--accent-tint); border-radius: 6px; padding: 1px 6px; flex: none; }
.chat-ltime { margin-left: auto; font-size: .68rem; color: var(--faint); flex: none; }
.chat-lprev { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-lunread {
  flex: none; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 800;
  min-width: 20px; height: 20px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}

/* ---------- 채팅방 ---------- */
.chatroom { position: relative; display: flex; flex-direction: column; height: calc(100dvh - 132px); min-height: 380px; }
.chatroom-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); position: relative; z-index: 1; }
.chatroom-head b { font-size: 1rem; color: var(--ink); }
.chatroom-sub { font-size: .74rem; color: var(--muted); margin-left: 8px; }
/* .chat-msgs.static(뒤쪽 정의)를 이기도록 specificity 높임 */
.chatroom .chatroom-msgs.static { flex: 1; min-height: 0; max-height: none; margin: 10px 0; overflow-y: auto; position: relative; z-index: 1; background: transparent; padding: 4px; }
/* 카톡식 날짜 구분선 */
.chat-date-sep { display: flex; justify-content: center; margin: 10px 0 4px; }
.chat-date-sep span { font-size: .68rem; color: var(--muted); background: rgba(0,0,0,.06); border-radius: 999px; padding: 3px 12px; }
:root[data-theme="dark"] .chat-date-sep span { background: rgba(255,255,255,.08); }
.dm-picker { display: flex; flex-direction: column; max-height: 55vh; overflow-y: auto; margin-bottom: 4px; }
/* 배경 워터마크 (브랜드 로고 흐리게) */
.chat-bg {
  position: absolute; inset: 40px 0 70px; pointer-events: none; z-index: 0;
  -webkit-mask: url(/img/mark.svg) no-repeat center / 46%;
          mask: url(/img/mark.svg) no-repeat center / 46%;
  background: var(--ink); opacity: .04;
}
.chatroom-input { position: relative; z-index: 1; margin-top: auto; padding-bottom: env(safe-area-inset-bottom); }
/* 채팅 화면은 말씀 푸터 숨기고 페이지 스크롤 억제 (입력창 하단 고정) */
main.page:has(.chatroom) { padding-bottom: 0; overflow: hidden; }
main.page:has(.chatroom) ~ .footer-verse { display: none; }
.chat-plus {
  flex: none; width: 40px; height: 44px; border: 0; background: none; cursor: pointer;
  font-size: 1.5rem; color: var(--muted); line-height: 1;
}
.chatroom-input .input { min-height: 44px; }
.chat-tools { display: flex; gap: 6px; padding: 8px 2px; position: relative; z-index: 1; flex-wrap: wrap; }
.c-tool {
  display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: var(--bg);
  border-radius: 12px; padding: 8px 12px; cursor: pointer; font-size: 1.15rem; color: var(--ink); min-width: 58px;
}
.c-tool span { font-size: .64rem; color: var(--muted); }
.c-tool.recording { background: var(--accent); color: #fff; animation: recpulse 1s infinite; }
.c-tool.recording span { color: #fff; }
@keyframes recpulse { 50% { opacity: .55; } }
.chat-palette { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: var(--bg); border-radius: 14px; position: relative; z-index: 1; max-height: 160px; overflow-y: auto; }
.chat-palette .c-emoji, .chat-palette .c-stk { border: 0; background: none; cursor: pointer; border-radius: 10px; padding: 4px; }
.chat-palette .c-emoji { font-size: 1.35rem; }
.chat-palette.sticker .c-stk { font-size: 2rem; }
.chat-palette .c-emoji:active, .chat-palette .c-stk:active { background: var(--line); }
/* 리치 미디어 메시지 */
.chat-msg.sticker { background: none; align-items: flex-end; }
.sticker-msg { font-size: 3.2rem; line-height: 1; padding: 2px 0; }
.bubble.media { padding: 5px; }
.chat-img { max-width: 220px; max-height: 260px; border-radius: 12px; display: block; cursor: pointer; }
.bubble.media audio { display: block; max-width: 240px; height: 40px; }
.chat-file { display: flex; align-items: center; gap: 6px; text-decoration: none; color: inherit; font-size: .86rem; }
.chat-file span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-file small { color: var(--faint); font-size: .72rem; }
.chat-ai-ava {
  width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--accent-tint); font-size: .8rem;
}
.chat-msg.ai .bubble { background: var(--accent-tint); color: var(--ink); }
.chat-msg.ai .who { color: var(--accent); }
:root[data-theme="dark"] .chat-ic { background: #262322; }
:root[data-theme="dark"] .chat-msg.ai .bubble { background: #3a2420; }
:root[data-theme="dark"] .chat-bg { background: #fff; opacity: .05; }
:root[data-theme="dark"] .c-tool, :root[data-theme="dark"] .chat-palette { background: #262322; }

/* ---------- 사이드 메뉴 (햄버거) ---------- */
.menu-scrim {
  position: fixed; inset: 0; z-index: 55; background: rgba(32,30,29,.45);
  display: flex; justify-content: flex-end;
}
.menu-panel {
  width: min(380px, 86%); height: 100%; background: var(--card);
  display: flex; flex-direction: column; padding: 18px 16px calc(18px + var(--safe-bottom));
  box-shadow: -12px 0 40px rgba(0,0,0,.18); animation: slide-in .22s ease; overflow: auto;
}
@keyframes slide-in { from { transform: translateX(30px); opacity: 0; } }
.menu-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 4px 6px 16px; border-bottom: 1px solid var(--line);
}
.menu-team {
  display: flex; align-items: center; gap: 10px; border: 0; background: none;
  cursor: pointer; flex: 1; min-width: 0; text-align: left; padding: 0;
}
.menu-team-mark { width: 34px; height: 34px; color: var(--ink); flex: none; }
.menu-team-logo { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; flex: none; }
.menu-team-name {
  font-size: .96rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.menu-team-caret { color: var(--faint); font-size: .82rem; flex: none; }
.menu-profile {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 16px 8px; border: 0; border-bottom: 1px solid var(--line);
  background: none; cursor: pointer; text-align: left;
}
.menu-profile b { display: block; font-size: 1rem; color: var(--ink); }
.menu-profile-sub { display: block; font-size: .78rem; color: var(--muted); margin-top: 3px; }
.menu-arrow { color: var(--faint); }
.menu-list { flex: 1; padding: 8px 0; }
.menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px; border-radius: 13px; border: 0; background: none; cursor: pointer;
  font-size: 1rem; font-weight: 600; color: var(--ink); text-align: left; width: 100%;
}
.menu-item .hint { font-size: .75rem; color: var(--faint); font-weight: 500; }
.menu-item.on { color: var(--accent); background: var(--accent-tint); font-weight: 700; }
.menu-item.on .hint { color: var(--accent-deep); }
.pro-badge {
  font-size: .62rem; font-weight: 800; letter-spacing: .06em; color: #fff;
  background: var(--accent); padding: 3px 7px; border-radius: 7px;
}
.menu-verse {
  background: var(--black); border-radius: 16px; padding: 18px 20px; color: #fff; margin: 6px 6px 0;
}
.menu-verse p { font-size: .8rem; font-style: italic; line-height: 1.65; color: rgba(255,255,255,.86); }
.menu-verse span {
  display: block; font-size: .64rem; font-weight: 700; letter-spacing: .08em;
  color: var(--accent); margin-top: 10px;
}
.menu-channels { border-top: 1px solid var(--line); margin-top: 16px; padding: 16px 6px 4px; }
.menu-channels-label { font-size: .72rem; font-weight: 700; color: var(--faint); letter-spacing: .05em; margin-bottom: 12px; }
.menu-channels-row { display: flex; gap: 10px; }
.menu-channel {
  flex: 1; display: flex; align-items: center; gap: 10px; background: var(--bg);
  border-radius: 14px; padding: 12px 14px; text-decoration: none; color: var(--ink);
}
.menu-channel span { font-size: .84rem; font-weight: 600; }

/* ---------- 레이아웃 ---------- */
main.page { max-width: 980px; margin: 0 auto; padding: clamp(16px, 3vw, 30px) clamp(16px, 3vw, 28px) 60px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { font-size: 1.4rem; font-weight: 700; letter-spacing: -.03em; }
.page-head .grow { flex: 1; }
.footer-verse { text-align: center; color: var(--faint); font-size: .82rem; padding: 36px 16px 20px; }
.sec-title, .pane-head h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.sec-head .more { border: 0; background: none; color: var(--accent); font-size: .85rem; font-weight: 700; cursor: pointer; }

/* ---------- 공통 컴포넌트 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line2); background: var(--card); color: var(--ink);
  border-radius: 13px; padding: 10px 18px; cursor: pointer;
  font-size: .92rem; font-weight: 600; min-height: 46px;
  transition: transform .12s ease;
  white-space: nowrap; /* 좁은 화면에서 버튼 글자가 세로로 쪼개지지 않게 */
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.btn.accent { background: var(--black); border-color: var(--black); color: #fff; font-weight: 700; }
.btn.danger { color: var(--accent); }
.btn.ghost { background: none; border-color: transparent; }
.btn.sm { min-height: 38px; padding: 6px 13px; font-size: .85rem; border-radius: 11px; }
.btn:disabled { opacity: .45; cursor: default; }

.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--line2); border-radius: 13px;
  padding: 12px 14px; background: var(--card); min-height: 48px;
  outline: none; color: var(--ink);
}
.input:focus { border-color: var(--ink); }
.input::placeholder { color: var(--faint); }
textarea.input { min-height: 90px; resize: vertical; }
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 6px; font-weight: 600; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

.key-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 25px; padding: 0 8px;
  background: var(--black); color: #fff;
  border-radius: 8px; font-weight: 800; font-size: .8rem;
}
.chip {
  border: 1px solid var(--line2); background: var(--card); cursor: pointer;
  border-radius: 18px; height: 38px; padding: 0 15px; font-size: .84rem; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; color: var(--text);
}
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 700; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip.sm-chip { height: 32px; padding: 0 12px; font-size: .78rem; }
.version-box { padding: 16px 18px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.x-btn { border: 0; background: none; color: var(--faint); cursor: pointer; font-size: .85rem; padding: 4px; flex: none; }

.badge {
  font-size: .69rem; font-weight: 700; padding: 4px 9px; border-radius: 8px;
  background: #F3F2F2; color: var(--text); box-shadow: inset 0 0 0 1px var(--line2);
  display: inline-flex; align-items: center; gap: 4px;
  white-space: nowrap; flex: none;
}
.badge.md { background: var(--accent); color: #fff; box-shadow: none; }
.badge.pending { background: var(--accent-tint); color: var(--accent-deep); box-shadow: none; }

.empty {
  text-align: center; color: var(--muted); padding: 52px 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.empty .big { font-size: 1.9rem; margin-bottom: 8px; }
.empty-line { color: var(--faint); font-size: .88rem; }

.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .85rem; flex: none;
}
.avatar.photo { object-fit: cover; }

/* ---------- 토스트 / 모달 ---------- */
#toast-root { position: fixed; left: 50%; bottom: calc(24px + var(--safe-bottom)); transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(420px, 92vw); }
.toast {
  background: var(--black); color: #fff; border-radius: 13px;
  padding: 13px 18px; box-shadow: 0 6px 24px rgba(32,30,29,.3);
  animation: toast-in .18s ease-out; text-align: center; font-size: .9rem; font-weight: 500;
}
.toast.error { background: var(--accent); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* 관리자 팝업 공지/광고 오버레이 (터치하면 닫힘) */
.popup-ad {
  position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 28px;
  background: rgba(26,24,23,.6); backdrop-filter: blur(3px); animation: toast-in .18s ease-out; cursor: pointer;
}
.popup-card {
  width: min(360px, 100%); background: #fff; border-radius: 22px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(26,24,23,.4); text-align: center; padding: 26px 24px 22px;
}
.popup-logo { display: block; width: 122px; margin: 0 auto 4px; color: var(--black); line-height: 0; }
.popup-logo svg { display: block; width: 100%; height: auto; color: inherit; }
.popup-img { display: block; width: 100%; max-height: 46vh; object-fit: contain; border-radius: 14px; margin: 16px 0 4px; }
.popup-title { font-size: 1.15rem; font-weight: 700; color: var(--ink); margin-top: 16px; letter-spacing: -.02em; }
.popup-body { font-size: .92rem; line-height: 1.6; color: var(--text); margin-top: 8px; white-space: pre-wrap; word-break: break-word; }
.popup-hint { display: block; font-size: .74rem; color: var(--muted); margin-top: 18px; }
:root[data-theme="dark"] .popup-card { background: #2A2726; }
:root[data-theme="dark"] .popup-logo { color: #fff; }
/* 설정: 팝업 목록 */
.pop-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.pop-row { display: flex; align-items: center; gap: 11px; }
.pop-thumb { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; flex: none; background: var(--bg); display: grid; place-items: center; font-size: 1.1rem; }
.pop-row b { display: block; font-size: .9rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-sub { display: block; font-size: .76rem; color: var(--muted); margin-top: 2px; }
.pop-live { color: var(--accent); font-weight: 700; }
.pop-img-prev:not(:empty) { margin-top: 10px; }
.pop-img-prev img { max-width: 100%; border-radius: 12px; display: block; }

/* 새 버전 새로고침 바 */
.update-bar {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 90;
  display: flex; align-items: center; gap: 10px; max-width: 460px; margin: 0 auto;
  background: var(--black); color: #fff; border-radius: 15px; padding: 12px 12px 12px 18px;
  box-shadow: 0 8px 30px rgba(32,30,29,.35); animation: toast-in .2s ease-out;
}
.update-bar .grow { font-size: .9rem; font-weight: 600; }
.update-bar .update-reload {
  border: 0; background: var(--accent); color: #fff; font-weight: 700; font-size: .85rem;
  padding: 9px 16px; border-radius: 11px; cursor: pointer; white-space: nowrap; font-family: inherit;
}
.update-bar .update-close {
  border: 0; background: rgba(255,255,255,.12); color: #fff; width: 34px; height: 34px;
  border-radius: 10px; cursor: pointer; flex: none; font-size: .8rem;
}

.modal-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(32,30,29,.45);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.modal {
  background: var(--card); border-radius: 22px; width: min(560px, 100%);
  max-height: min(88dvh, 920px); overflow: auto; padding: 24px;
  box-shadow: 0 20px 60px rgba(32,30,29,.35); animation: up .22s ease;
}
.modal h2 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 16px; }
.modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
@keyframes up { from { opacity: 0; transform: translateY(12px); } }
.modal-kicker { font-size: .74rem; font-weight: 700; color: var(--faint); letter-spacing: .05em; }

/* 초대 메일 모달 */
.inv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.inv-chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--line); border-radius: 10px;
  padding: 7px 8px 7px 11px; font-size: .82rem; color: var(--black);
}
.inv-chip button {
  width: 18px; height: 18px; border: 0; border-radius: 9px; background: var(--line2);
  color: #54504E; font-size: .68rem; display: grid; place-items: center; cursor: pointer;
}
.inv-chip button:hover { background: var(--accent); color: #fff; }
.inv-presets { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.inv-preset {
  border: 0; font-size: .8rem; color: var(--accent); background: var(--accent-tint);
  padding: 8px 13px; border-radius: 20px; cursor: pointer; font-weight: 600;
}
.inv-preview {
  margin-top: 4px; background: #FAF9F9; box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 14px; padding: 14px;
}
.inv-preview-label { font-size: .72rem; font-weight: 700; color: var(--faint); letter-spacing: .05em; }
.inv-preview b { display: block; font-size: .88rem; margin-top: 7px; letter-spacing: -.01em; }
.inv-preview p { font-size: .82rem; line-height: 1.6; color: #54504E; margin-top: 6px; }
.inv-preview-foot {
  font-size: .76rem; color: var(--muted); margin-top: 9px; padding-top: 9px;
  border-top: 1px solid var(--line);
}

/* 팀 전환 / 생성 시트 */
.team-list { display: flex; flex-direction: column; gap: 8px; }
.team-row {
  display: flex; align-items: center; gap: 13px; padding: 14px; border-radius: 16px;
  border: 0; cursor: pointer; text-align: left; width: 100%;
  background: #FAF9F9; box-shadow: inset 0 0 0 1px var(--line);
}
.team-row.on { background: var(--accent-tint); box-shadow: inset 0 0 0 1px var(--accent-line); cursor: default; }
.team-row b { display: block; font-size: .92rem; color: var(--ink); }
.team-row-sub { display: block; font-size: .75rem; color: var(--muted); margin-top: 3px; }
.team-logo { width: 42px; height: 42px; border-radius: 14px; object-fit: cover; flex: none; }
.team-logo.mark { background: var(--black); display: grid; place-items: center; }
.team-logo.mark .brandmark { width: 22px; height: 22px; color: #fff; }
.team-current {
  font-size: .68rem; font-weight: 700; color: var(--accent); background: var(--accent-tint);
  padding: 5px 9px; border-radius: 8px; flex: none;
}
.team-join { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.team-join > b { font-size: .86rem; }
.team-pending {
  margin-top: 14px; border-radius: 16px; padding: 16px 18px;
  background: var(--accent-tint); box-shadow: inset 0 0 0 1px var(--accent-line);
}
.team-pending b { font-size: .88rem; color: var(--accent-deep); }
.team-pending p { font-size: .78rem; color: var(--accent-deep); margin-top: 4px; opacity: .8; }
.team-create-cta {
  margin-top: 14px; border-radius: 16px; padding: 16px 18px; width: 100%;
  background: #FAF9F9; box-shadow: inset 0 0 0 1px var(--line); border: 0;
  display: flex; align-items: center; gap: 13px; cursor: pointer; text-align: left;
}
.team-create-cta b { display: flex; align-items: center; gap: 7px; font-size: .88rem; color: var(--ink); }
.team-create-ico {
  width: 38px; height: 38px; border-radius: 12px; background: var(--line);
  display: grid; place-items: center; flex: none;
}
#team-create-form { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }

/* 설정 화면: 토글 / 역할 배지 */
.toggle-row {
  display: flex; align-items: center; gap: 14px; padding: 13px 0;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.toggle-row:last-child { border-bottom: 0; padding-bottom: 0; }
.toggle-row b { display: block; font-size: .92rem; color: var(--ink); }
.toggle-hint { display: block; font-size: .76rem; color: var(--muted); margin-top: 2px; }
.toggle {
  appearance: none; width: 48px; height: 28px; border-radius: 14px; background: var(--line2);
  position: relative; cursor: pointer; transition: background .18s ease; flex: none;
}
.toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 11px; background: #fff; box-shadow: 0 1px 3px rgba(32,30,29,.25);
  transition: transform .18s ease;
}
.toggle:checked { background: var(--accent); }
.toggle:checked::after { transform: translateX(20px); }
.badge-member { padding: 12px 0; border-bottom: 1px solid var(--line); }
.badge-member:last-child { border-bottom: 0; }
.badge-member-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.badge-member-head b { font-size: .92rem; }

/* 프로필 온보딩 (7단계) */
.pf-dots { display: flex; gap: 5px; margin-bottom: 14px; }
.pf-dots span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.pf-dots span.on { background: var(--accent); }
.pf-level-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.pf-level-row b { min-width: 52px; font-size: .9rem; }
.pf-level-guide { margin-top: 14px; background: var(--bg); border-radius: 14px; padding: 12px 14px; }
.pf-level-guide p { font-size: .78rem; color: var(--muted); margin: 3px 0; }
.pf-level-guide b { color: var(--ink); margin-right: 6px; }
.profile-together { text-align: right; flex: none; }
.profile-together span { display: block; font-size: .7rem; color: var(--faint); }
.profile-together b { display: block; font-size: .92rem; margin-top: 3px; }
.profile-together em { display: block; font-style: normal; font-size: .78rem; font-weight: 700; color: var(--accent); margin-top: 2px; }
.church-tag {
  font-size: .8rem; font-weight: 600; color: #fff; background: var(--black);
  padding: 6px 12px; border-radius: 18px;
}
.me-level-card {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px; margin-bottom: 14px;
  font-size: .92rem;
}
.me-level-card b { margin-left: 6px; }
.me-level-card em { font-style: normal; font-weight: 800; color: var(--accent); }

/* 부실 예약: 주간⇄월간 토글 + 월간 그리드 + 승인 대기 */
.view-toggle {
  flex: none; white-space: nowrap;
  display: inline-flex; background: var(--bg); border-radius: 11px; padding: 3px; margin-left: 4px;
}
.view-toggle button {
  border: 0; background: none; padding: 6px 12px; border-radius: 9px;
  font-size: .78rem; font-weight: 600; color: var(--muted); cursor: pointer;
}
.view-toggle button.on { background: var(--card); color: var(--ink); font-weight: 700; box-shadow: var(--shadow); }
/* 부실 예약 — 디자인: 헤더(주간/월간 칩 + 예약 만들기) + 안내/범례 줄 + 월간 라벨 칩 */
.rm-subhead {
  display: flex; align-items: center; justify-content: space-between; gap: 8px 14px;
  flex-wrap: wrap; margin: -6px 0 14px;
}
.rm-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rm-nav .btn { flex: none; }
.rm-hint { font-size: .8rem; color: var(--muted); margin-left: 4px; }
.rm-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rm-legend span { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--muted); white-space: nowrap; }
.rm-lg { width: 12px; height: 12px; flex: none; display: inline-block; }
.rm-lg.dark { background: var(--black); }
.rm-lg.red { background: var(--accent); }
.rm-lg.line { background: var(--card); border: 1.5px solid var(--black); box-sizing: border-box; }
.rm-month { padding: 16px; }
.rm-title { font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.rm-dows { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 6px; }
.rm-dows span { text-align: center; font-size: .72rem; font-weight: 700; color: var(--faint); padding: 4px 0; }
.rm-dows span.sun { color: var(--accent); }
.rm-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.rm-cell {
  min-height: 88px; border-radius: 10px; background: var(--card); border: 1px solid var(--line);
  cursor: pointer; padding: 7px; text-align: left; display: flex; flex-direction: column;
  gap: 3px; align-items: flex-start; overflow: hidden; min-width: 0; font: inherit;
}
.rm-cell.empty { background: none; border-color: transparent; cursor: default; }
.rm-cell.rtoday { border-color: var(--accent); box-shadow: inset 0 0 0 .5px var(--accent); }
.rm-cell.sun .rm-day { color: var(--accent); }
.rm-day { font-size: .74rem; font-weight: 700; color: var(--muted); }
.rm-chip {
  font-size: .64rem; font-weight: 700; border-radius: 5px; padding: 2px 5px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-sizing: border-box;
}
.rm-chip.dark { background: var(--black); color: #fff; }
.rm-chip.red { background: var(--accent); color: #fff; }
.rm-chip.line { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--black); }
.rm-chip.line.pending { color: var(--muted); box-shadow: inset 0 0 0 1px var(--line2); border-style: dashed; }
.rm-more { font-size: .62rem; color: var(--faint); }
@media (max-width: 640px) {
  .rm-cell { min-height: 70px; padding: 5px; }
  .rm-chip { font-size: .56rem; padding: 2px 4px; }
}
:root[data-theme="dark"] .rm-cell { background: #262322; border-color: #3A3634; }
:root[data-theme="dark"] .rm-cell.empty { background: none; border-color: transparent; }
:root[data-theme="dark"] .rm-chip.dark { background: #F5F3F2; color: #201E1D; }
:root[data-theme="dark"] .rm-chip.line { box-shadow: inset 0 0 0 1px #F5F3F2; color: var(--ink); background: transparent; }
:root[data-theme="dark"] .rm-lg.dark { background: #F5F3F2; }
:root[data-theme="dark"] .rm-lg.line { border-color: #F5F3F2; background: transparent; }
.room-block.pending { opacity: .65; border: 1.5px dashed var(--accent-line); }
.badge.pending { background: var(--bg); color: var(--muted); }

/* 말씀 찾기 피커 */
.bible-results { margin-top: 12px; max-height: 46dvh; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.bible-verse {
  display: block; width: 100%; text-align: left; border: 0; cursor: pointer;
  background: #FAF9F9; box-shadow: inset 0 0 0 1px var(--line); border-radius: 13px; padding: 11px 13px;
}
.bible-verse.on { background: var(--accent-tint); box-shadow: inset 0 0 0 1.5px var(--accent-line); }
.bible-ref { display: block; font-size: .72rem; font-weight: 700; color: var(--accent); margin-bottom: 3px; }
.bible-text { display: block; font-size: .88rem; line-height: 1.6; color: var(--text); }
.bible-picked { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* 오류/빈 상태 화면 */
.state-screen {
  min-height: 70dvh; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 24px; gap: 6px;
}
.state-mark { width: 46px; height: 46px; color: var(--line2); margin-bottom: 10px; }
.state-screen h2 { font-size: 1.1rem; letter-spacing: -.02em; }
.state-screen p { color: var(--muted); font-size: .88rem; max-width: 320px; }
.state-actions { display: flex; gap: 8px; margin-top: 18px; }

/* 캘린더 주간 뷰 */
.cal-week { display: flex; flex-direction: column; gap: 10px; }
.cw-day { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.cw-day.today { box-shadow: inset 0 0 0 1.5px var(--accent), var(--shadow); }
.cw-date {
  display: flex; align-items: baseline; gap: 8px; width: 100%; border: 0;
  background: none; cursor: pointer; padding: 13px 16px 4px; text-align: left;
}
.cw-date b { font-size: 1.05rem; color: var(--ink); }
.cw-date span { font-size: .76rem; color: var(--muted); flex: 1; }
.cw-date.sun b { color: var(--accent); }
.cw-date em { font-style: normal; color: var(--faint); font-size: .9rem; }
.cw-evs { padding: 4px 16px 13px; display: flex; flex-direction: column; gap: 8px; }
.cw-ev { display: flex; align-items: center; gap: 10px; }
.cw-ev .ev-bar { width: 4px; align-self: stretch; border-radius: 2px; flex: none; }
.cw-ev b { display: block; font-size: .9rem; color: var(--ink); }
.cw-ev .time { display: block; font-size: .74rem; color: var(--muted); margin-top: 1px; }
.cw-empty { font-size: .78rem; color: var(--faint); }

/* 콘티 메시지 / 레퍼런스 */
.msg-box { padding: 16px 18px; margin-bottom: 14px; }
.msg-label { display: block; font-size: .72rem; font-weight: 700; color: var(--faint); letter-spacing: .05em; margin-bottom: 7px; }
.msg-box p { font-size: .92rem; line-height: 1.7; white-space: pre-wrap; }
.ref-link {
  display: block; font-size: .84rem; color: var(--accent); text-decoration: none;
  padding: 5px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ref-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin-top: 6px;
  background: var(--bg); border-radius: 12px; font-size: .82rem;
}
.ref-row a { color: var(--accent); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-row button {
  border: 0; background: var(--line2); color: #54504E; width: 20px; height: 20px;
  border-radius: 10px; font-size: .68rem; cursor: pointer; flex: none;
}

/* ---------- 로그인 (다크 풀스크린 — 디자인 3a/3b) ---------- */
.auth-wrap {
  min-height: 100dvh; display: flex; align-items: flex-start; justify-content: center;
  background: var(--black); padding: max(44px, 8vh) 28px 28px; color: #fff;
}
.auth-card { width: min(400px, 100%); }
.auth-logo { display: none; }
.auth-wordmark { width: 56%; max-width: 230px; margin: 0 auto 16px; color: #fff; display: block; }
.auth-verse { text-align: center; color: rgba(255,255,255,.42); font-size: 12.5px; line-height: 20px; margin-bottom: 34px; text-wrap: pretty; }
.auth-verse .lit { animation: verse-lit 3.2s ease-in-out infinite; }
@keyframes verse-lit { 0%, 100% { color: rgba(255,255,255,.38); } 50% { color: #fff; } }
.auth-verse-ref { display: block; margin-top: 7px; font-size: .82em; letter-spacing: .12em; color: rgba(255,255,255,.32); }
.auth-panel { background: none; border-radius: 0; padding: 0; }
.auth-panel h2 { color: #fff; }
.auth-tabs { display: flex; gap: 5px; background: rgba(255,255,255,.07); border-radius: 14px; padding: 5px; margin-bottom: 22px; }
.auth-tabs button {
  flex: 1; border: 0; background: none; padding: 10px; border-radius: 10px;
  cursor: pointer; color: rgba(255,255,255,.55); font-weight: 600; min-height: 42px; font-size: 14px;
}
.auth-tabs button.active { background: #fff; color: #201E1D; font-weight: 700; box-shadow: none; }
.auth-hint { font-size: 13px; color: rgba(255,255,255,.45); text-align: center; margin-top: 16px; }
.auth-hint .link, .link { border: 0; background: none; color: var(--accent); font-weight: 700; cursor: pointer; font-size: inherit; padding: 0; }
.auth-forgot { color: rgba(255,255,255,.45) !important; font-weight: 500 !important; }
.auth-foot { text-align: center; margin-top: 26px; font-size: 11.5px; color: rgba(255,255,255,.28); }
.auth-wrap .field label { color: rgba(255,255,255,.5); font-size: 12px; font-weight: 600; }
.auth-wrap .input {
  height: 52px; border-radius: 14px; border: 0; background: rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); color: #fff; font-size: 15px; padding: 0 15px;
}
.auth-wrap .input:focus { box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); outline: none; }
.auth-wrap .input::placeholder { color: rgba(255,255,255,.32); }
.auth-wrap .input[readonly] { color: rgba(255,255,255,.55); }
.auth-pw { position: relative; }
.auth-pw .input { width: 100%; padding-right: 46px; }
.pw-eye {
  position: absolute; top: 0; right: 0; width: 46px; height: 52px; border: 0; background: none;
  color: rgba(255,255,255,.45); cursor: pointer; display: grid; place-items: center;
}
.auth-pw-hint { display: block; font-size: 11.5px; color: rgba(255,255,255,.35); margin-top: 7px; }
.auth-info {
  display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; padding: 13px 14px;
  border-radius: 14px; background: rgba(236,48,19,.12); box-shadow: inset 0 0 0 1px rgba(236,48,19,.35);
  font-size: 12.5px; line-height: 19px; color: rgba(255,255,255,.78);
}
.auth-info svg { flex: none; margin-top: 1px; }
.auth-check {
  display: flex; align-items: center; gap: 9px; margin-top: 6px; border: 0; background: none;
  color: rgba(255,255,255,.75); font-size: 13.5px; cursor: pointer; padding: 4px 0; font-family: inherit;
}
.auth-check-box {
  width: 20px; height: 20px; border-radius: 6px; background: rgba(255,255,255,.1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); display: grid; place-items: center; flex: none;
  transition: background .15s ease;
}
.auth-check-box svg { opacity: 0; }
.auth-check.on .auth-check-box { background: var(--accent); box-shadow: none; }
.auth-check.on .auth-check-box svg { opacity: 1; }
.auth-submit {
  width: 100%; height: 54px; border-radius: 15px; border: 0; background: var(--accent); color: #fff;
  font-size: 15.5px; font-weight: 700; cursor: pointer; margin-top: 22px; font-family: inherit;
  transition: transform .12s ease, filter .12s ease;
}
.auth-submit:active { transform: scale(.98); }
.auth-submit:disabled { filter: grayscale(.4); opacity: .6; cursor: default; }
/* 비밀번호 찾기(인증번호 3단계) */
.auth-steps { display: flex; gap: 7px; justify-content: center; margin-bottom: 22px; }
.auth-step-dot { width: 24px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.14); transition: background .2s ease; }
.auth-step-dot.on { background: var(--accent); }
.auth-h2 { color: #fff; font-size: 1.28rem; font-weight: 700; text-align: center; letter-spacing: -.02em; }
.auth-desc { color: rgba(255,255,255,.5); font-size: 13px; line-height: 20px; text-align: center; margin: 8px 0 24px; text-wrap: pretty; }
.auth-code { text-align: center; letter-spacing: .5em; font-size: 22px !important; font-weight: 700; padding-right: 0 !important; }
.auth-code::placeholder { letter-spacing: .5em; }

/* ---------- 홈 ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--black); border-radius: 22px; padding: 26px 26px 24px;
  color: #fff; box-shadow: var(--shadow-pop); border: 0;
}
.hero .brandmark { position: absolute; right: -20px; top: 12px; width: 190px; color: rgba(255,255,255,.06); pointer-events: none; }
.hero-hello { font-size: .82rem; color: rgba(255,255,255,.55); }
.hero h2 { font-size: 1.42rem; font-weight: 700; letter-spacing: -.03em; color: #fff; margin-top: 6px; }
.hero-next { font-size: .78rem; color: rgba(255,255,255,.5); margin-top: 16px; }
.hero-worship { font-size: 1.05rem; font-weight: 600; color: #fff; margin-top: 4px; }
.hero-meta { font-size: .8rem; color: rgba(255,255,255,.6); margin-top: 6px; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hero-open {
  height: 42px; padding: 0 18px; border: 0; border-radius: 12px; cursor: pointer;
  background: #fff; color: var(--black); font-weight: 700; font-size: .88rem; flex: none;
}
.hero-left { flex: 1; min-width: 0; }
.hero-btns { display: none; }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick-card {
  display: flex; align-items: center; gap: 12px; border: 0; text-align: left;
  background: var(--card); border: 1px solid var(--line2); border-radius: 18px;
  padding: 16px 18px; cursor: pointer; transition: transform .12s ease;
}
.quick-card:active { transform: scale(.97); }
.quick-card.tint { background: var(--accent-tint); border-color: transparent; }
.quick-ico { width: 38px; height: 38px; border-radius: 13px; background: var(--black); color: #fff; display: grid; place-items: center; flex: none; font-size: .9rem; }
.quick-card b { display: block; font-size: .92rem; font-weight: 700; color: var(--ink); }
.quick-card .sub { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.quick-card.tint .sub { color: var(--accent-deep); }

.live-banner {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--accent-tint); border: 0; border-radius: 18px; padding: 16px 18px;
  cursor: pointer; animation: up .3s ease; transition: transform .12s ease;
}
.live-banner:active { transform: scale(.98); }
.live-banner b { font-size: .95rem; font-weight: 700; color: var(--ink); display: block; }
.live-banner .sub { font-size: .78rem; color: var(--accent-deep); margin-top: 3px; }
.live-join { height: 42px; padding: 0 18px; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 700; font-size: .85rem; display: grid; place-items: center; flex: none; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; animation: pulse 1.2s ease infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.notice-input-row { display: flex; gap: 8px; margin-bottom: 10px; }
.notice-input-row .input { flex: 1; }
.notice-input-row .btn.primary { min-height: 48px; border-radius: 13px; flex: none; }
.notice-row {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 16px; margin-bottom: 8px;
}
.notice-body { font-size: .9rem; color: var(--ink); }
.notice-meta { font-size: .75rem; color: var(--faint); margin-top: 2px; }
.notice-row .del, .comment .del {
  border: 0; background: none; color: var(--faint); cursor: pointer; font-size: .85rem; padding: 4px; flex: none;
}

.ev-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 13px 16px; margin-bottom: 8px; cursor: pointer; font: inherit;
}
.ev-bar { width: 3.5px; height: 34px; border-radius: 2px; flex: none; background: var(--accent); }
.ev-row .date { font-size: .78rem; font-weight: 700; color: var(--muted); width: 58px; flex: none; }
.ev-row b { font-size: .92rem; color: var(--ink); display: block; }
.ev-row .sub { font-size: .76rem; color: var(--faint); display: block; }
.ev-row .rsvp { font-size: .78rem; font-weight: 700; flex: none; }

.up-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; }
.up-row .grow { flex: 1; min-width: 0; }

/* 가로 스크롤 카드 */
.hscroll { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x proximity; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hcard {
  flex: none; scroll-snap-align: start; width: 148px; min-height: 96px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 13px 14px; text-align: left; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; gap: 4px; transition: transform .12s ease;
}
.hcard:active { transform: scale(.97); }
.hcard-title { font-size: .88rem; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hcard-sub { font-size: .74rem; color: var(--muted); }
.hcard-date { font-size: .72rem; color: var(--faint); font-weight: 600; }
.hcard-dot { width: 9px; height: 9px; border-radius: 50%; }
.hcard.ev { width: 152px; min-height: 104px; }
.hcard-plus { align-items: center; justify-content: center; color: var(--faint); font-weight: 600; font-size: .8rem; }
.hcard.bday { width: 128px; align-items: center; text-align: center; }
.hcard.bday.today { background: var(--accent-tint); border-color: var(--accent-line); }
.bday-dday { font-size: .72rem; font-weight: 800; color: var(--accent); }

.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.home-pane { padding: 18px; }
.pane-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
@media (max-width: 760px) { .home-grid { grid-template-columns: 1fr; } .quick-grid { grid-template-columns: 1fr; } }

/* ---------- 악보 라이브러리 ---------- */
.lib-toolbar { margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px; }
.search-row { display: flex; gap: 8px; align-items: center; }
.search-row .input { border-radius: 15px; flex: 1; min-width: 0; }
.search-row .btn { flex: none; }
.song-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.song-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 16px; cursor: pointer; transition: transform .12s ease;
}
.song-card:active { transform: scale(.98); }
.song-card .t-row { display: flex; align-items: center; gap: 8px; }
.song-card h3 { font-size: .98rem; font-weight: 700; letter-spacing: -.02em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-card .artist { color: var(--muted); font-size: .8rem; }
.song-card .meta { display: flex; gap: 10px; align-items: center; color: var(--faint); font-size: .76rem; margin-top: 10px; flex-wrap: wrap; }
.fav-star { border: 0; background: none; font-size: 1.05rem; cursor: pointer; color: #BEB9B6; padding: 2px; flex: none; }
.fav-star.on { color: var(--accent); }
.song-edit { border: 0; background: none; cursor: pointer; font-size: .9rem; padding: 2px 4px; color: var(--muted); }
.tag-row { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.tag { display: inline-block; color: #fff; font-size: .68rem; font-weight: 700; border-radius: 6px; padding: 2px 8px; letter-spacing: .01em; }
.mini-tag { font-size: .7rem; color: var(--accent-deep); background: var(--accent-tint); border-radius: 7px; padding: 2px 7px; font-weight: 600; }

/* ---------- 콘티 ---------- */
.setlist-cards { display: flex; flex-direction: column; gap: 10px; }
.setlist-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 17px 18px; cursor: pointer; transition: transform .12s ease;
}
.setlist-card:active { transform: scale(.985); }
.setlist-card h3 { font-size: 1rem; font-weight: 700; letter-spacing: -.02em; }
.setlist-card .meta { color: var(--muted); font-size: .8rem; margin-top: 3px; }
.songlist { display: flex; flex-direction: column; }
.songlist-item {
  display: flex; align-items: center; gap: 12px; padding: 13px 4px;
  border-top: 1px solid var(--line); cursor: pointer;
}
.songlist-item:first-child { border-top: 0; }
.songlist-item .ctl { display: flex; gap: 4px; flex: none; }
.songlist-item .ctl button {
  width: 30px; height: 30px; border-radius: 10px; border: 1px solid var(--line2);
  background: var(--card); color: var(--text); cursor: pointer; font-size: .7rem;
  display: grid; place-items: center; padding: 0;
}
.songlist-item .ctl button:disabled { opacity: .35; cursor: default; }
.songlist-item .info { min-width: 0; }
.songlist-item .info h4 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.songlist-item .num {
  width: 26px; height: 26px; border-radius: 9px; background: #F3F2F2; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; flex: none;
}
.songlist-item b { font-size: .93rem; color: var(--ink); }
.songlist-item .sub { font-size: .75rem; color: var(--faint); }
.version-box { display: flex; gap: 8px; flex-wrap: wrap; }
.count-pill { font-size: .72rem; background: #F3F2F2; border-radius: 999px; padding: 3px 9px; color: var(--muted); font-weight: 600; }

.builder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
@media (max-width: 760px) { .builder-grid { grid-template-columns: 1fr; } }
.builder-pane { padding: 16px; }
.picker-list { display: flex; flex-direction: column; max-height: 55dvh; overflow: auto; }
.picker-item {
  display: flex; gap: 10px; align-items: center; padding: 11px 8px; border-radius: 12px;
  cursor: pointer; border: 1.5px solid transparent; font: inherit; background: none; text-align: left;
}
.picker-item:hover { border-color: var(--line2); }
.picker-item.added { opacity: .38; }
.picker-item .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-check { color: var(--accent); font-weight: 800; }
.key-pick { border: 1px solid var(--line2); background: var(--card); border-radius: 8px; font-weight: 800; font-size: .8rem; min-width: 34px; height: 26px; cursor: pointer; }
.dropzone {
  border: 1.5px dashed var(--line2); border-radius: 14px; padding: 22px; text-align: center;
  color: var(--muted); cursor: pointer; font-size: .88rem; background: var(--card);
}
.dropzone:hover { border-color: var(--accent); color: var(--accent); }
.file-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.file-item {
  display: flex; align-items: center; gap: 8px; background: #F8F7F7;
  border-radius: 11px; padding: 8px 12px; font-size: .82rem; color: var(--text);
}
.file-item .ctl { border: 0; background: none; cursor: pointer; padding: 3px 5px; font-size: .82rem; color: var(--muted); }
.file-item .ctl:hover { color: var(--ink); }

/* ---------- 예배 ---------- */
.worship-desc { padding: 18px; }
.big-textarea { font-size: .95rem; line-height: 1.7; }
.desc-body { white-space: pre-wrap; font-size: .93rem; color: var(--ink); line-height: 1.75; }
.ref-link { display: block; padding: 9px 0; font-size: .87rem; color: var(--accent); font-weight: 600; text-decoration: none; border-top: 1px solid var(--line); }
.ref-link:first-of-type { border-top: 0; }
.worship-chat { padding: 18px; display: flex; flex-direction: column; }
.insta { color: var(--accent); text-decoration: none; font-weight: 600; }

/* ---------- 채팅 ---------- */
.chat-msgs { display: flex; flex-direction: column; gap: 9px; overflow-y: auto; }
.chat-msgs.static { max-height: 420px; background: var(--bg); border-radius: 14px; padding: 12px; margin-bottom: 10px; min-height: 200px; }
.chat-msg { display: flex; gap: 8px; align-items: flex-end; }
.chat-msg.me { flex-direction: row-reverse; }
.chat-msg .bubble {
  max-width: 76%; background: var(--card); border: 1px solid var(--line2); border-radius: 15px;
  padding: 9px 13px; font-size: .88rem; color: var(--ink);
}
.chat-msg.me .bubble { background: var(--accent); border-color: var(--accent); color: #fff; }
.chat-msg .who { display: block; font-size: .68rem; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.chat-msg .when { display: block; font-size: .64rem; color: var(--faint); margin-top: 3px; }
.chat-msg.me .when { color: rgba(255,255,255,.7); }
.chat-input-row { display: flex; gap: 8px; }
.chat-input-row .input { flex: 1; min-width: 0; }
.chat-input-row .btn { flex: none; }

/* ---------- 캘린더 ---------- */
.cal-head { display: flex; align-items: center; gap: 8px 10px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-head h2 { font-size: 1.15rem; font-weight: 700; white-space: nowrap; flex: none; }
.cal-head .btn { flex: none; }
.cal-legend { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .78rem; margin-left: auto; }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); white-space: nowrap; }
.cal-legend i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
@media (max-width: 640px) { .cal-legend { margin-left: 0; flex-basis: 100%; } }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-dow { text-align: center; font-size: .74rem; font-weight: 700; color: var(--muted); padding: 6px 0; }
.cal-dow.sun { color: var(--accent); }
.cal-cell {
  min-height: 76px; border-radius: 11px; padding: 7px; text-align: left;
  border: 1px solid var(--line); background: var(--card); cursor: pointer; font: inherit;
  display: flex; flex-direction: column; gap: 3px; overflow: hidden; min-width: 0;
}
.cal-cell.dim { background: transparent; border-color: transparent; }
.cal-cell .d { font-size: .74rem; font-weight: 700; color: var(--muted); }
.cal-cell .d.sun { color: var(--accent); }
.cal-cell.today { border-color: var(--ink); }
.cal-cell.selected { background: var(--accent-tint); border-color: var(--accent); }
.cal-cell.selected .d { color: var(--accent); }
.ev-chip {
  font-size: .64rem; font-weight: 700; color: #fff; border-radius: 5px; padding: 2px 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ev-more { font-size: .64rem; color: var(--faint); font-weight: 600; }
.day-panel { margin-top: 14px; }
.evs { display: flex; flex-direction: column; gap: 8px; }
.rsvp-row { display: flex; gap: 6px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.rsvp-btn {
  border: 1px solid var(--line2); background: var(--card); border-radius: 18px;
  height: 34px; padding: 0 13px; font-size: .78rem; font-weight: 600; cursor: pointer; color: var(--text);
}
.rsvp-btn.yes { background: var(--accent); border-color: var(--accent); color: #fff; }
.rsvp-btn.maybe { background: var(--black); border-color: var(--black); color: #fff; }
.rsvp-btn.no { background: #F3F2F2; border-color: var(--line2); color: var(--muted); }
.rsvp-line { font-size: .78rem; color: var(--muted); }
.rsvp-detail { display: flex; flex-direction: column; gap: 8px; }

/* ---------- 부실 예약 — 주간 그리드 ---------- */
.room-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.room-week { padding: 14px 14px 18px; overflow-x: auto; }
.room-scroll { min-width: 620px; }
.room-head-row { display: flex; margin-left: 46px; }
.room-head { flex: 1; text-align: center; padding: 8px 0 10px; font-size: .8rem; font-weight: 700; color: var(--ink); }
.room-head.sun { color: var(--accent); }
.room-head .rdate { display: block; font-size: .7rem; font-weight: 500; color: var(--faint); margin-top: 1px; }
.room-head.rtoday .rdate { color: var(--accent); font-weight: 700; }
.room-body { display: flex; }
.room-hours { width: 46px; flex: none; }
.room-hours span { display: block; font-size: .68rem; color: var(--faint); text-align: right; padding-right: 8px; transform: translateY(-7px); }
.room-cols { display: flex; flex: 1; }
.room-col { flex: 1; position: relative; border-left: 1px solid var(--line); }
.room-cell { border-bottom: 1px solid var(--line); cursor: pointer; }
.room-cell:hover { background: #FAF9F9; }
.room-cell.off { cursor: default; }
.room-block {
  position: absolute; left: 3px; right: 3px; box-sizing: border-box; overflow: hidden;
  border-radius: 11px; padding: 7px 9px; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--black); color: var(--ink);
  display: flex; flex-direction: column; justify-content: center;
}
.room-block b { font-size: .74rem; font-weight: 700; line-height: 1.3; display: block; overflow: hidden; text-overflow: ellipsis; word-break: keep-all; }
.room-block .sub { font-size: .64rem; color: var(--muted); line-height: 1.3; margin-top: 2px; }
/* 1시간짜리 기도회 블록 — 좁은 높이에서 제목이 잘리지 않게 콤팩트 */
.room-block.pray { padding: 3px 8px; }
.room-block.pray b { font-size: .66rem; white-space: nowrap; }
.room-block.pray .sub { font-size: .6rem; margin-top: 0; white-space: nowrap; }
.room-block.logo { background: var(--black); border-color: var(--black); color: #fff; }
.room-block.logo .sub { color: rgba(255,255,255,.62); }
.room-block.logo .brandmark { width: 26px; color: #fff; margin-bottom: 3px; }
.room-block.pray { background: var(--accent); border-color: var(--accent); color: #fff; }
.room-block.pray .sub { color: rgba(255,255,255,.75); }
.stepper { display: inline-flex; align-items: center; gap: 14px; border: 1px solid var(--line2); border-radius: 13px; padding: 6px 10px; }
.stepper button { width: 34px; height: 34px; border-radius: 10px; border: 0; background: #F3F2F2; font-size: 1.05rem; font-weight: 700; cursor: pointer; color: var(--ink); }
.stepper b { min-width: 44px; text-align: center; font-size: 1rem; }

/* ---------- 멤버 ---------- */
.member-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.member-pick-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 13px;
  border: 1.5px solid var(--line); background: #FAF9F9; cursor: pointer; font: inherit; text-align: left;
}
.member-pick-item.on { border-color: var(--accent-line); background: var(--accent-tint); }
.member-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 13px 16px; margin-bottom: 8px; cursor: pointer; transition: transform .12s ease;
}
.member-row:active { transform: scale(.985); }
.member-row .info { flex: 1; min-width: 0; }
.member-row .info b, .member-row .info .email { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-row .btn { flex: none; padding: 8px 12px; min-height: 38px; font-size: .82rem; }
.part-tag { font-size: .74rem; color: var(--muted); font-weight: 600; }
.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.profile-list { display: flex; flex-direction: column; }
.profile-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-top: 1px solid var(--line); font-size: .9rem; }
.profile-row:first-child { border-top: 0; }
.p-ico { width: 24px; text-align: center; flex: none; }
.p-label { color: var(--muted); font-size: .8rem; width: 74px; flex: none; }
.p-value { color: var(--ink); font-weight: 500; }

/* ---------- 마이페이지 ---------- */
.me-photo-row { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.me-photo .avatar { width: 88px; height: 88px; font-size: 2rem; }
.me-photo img.avatar { width: 88px; height: 88px; }
.sns-card { margin-top: 14px; padding: 18px 20px; display: flex; align-items: center; gap: 14px; }
.sns-label { font-weight: 700; font-size: .92rem; color: var(--ink); }
.sns-row { display: flex; gap: 10px; margin-left: auto; }
.sns-btn {
  width: 48px; height: 48px; border-radius: 14px; display: inline-flex;
  align-items: center; justify-content: center; color: #fff; transition: transform .12s;
}
.sns-btn:active { transform: scale(.93); }
.sns-btn.yt { background: #FF0000; }
.sns-btn.ig { background: radial-gradient(circle at 30% 110%, #fdcb52 0%, #fd4d64 45%, #b62ea8 70%, #4f5bd5 100%); }

/* ---------- 알림함 ---------- */
.notif-list { display: flex; flex-direction: column; max-height: 55dvh; overflow: auto; }
.notif-row {
  display: flex; gap: 10px; align-items: center; text-align: left;
  border: 0; background: none; cursor: pointer; font: inherit; color: inherit;
  padding: 13px 8px; border-radius: 13px; margin-bottom: 2px;
}
.notif-row.unread { background: var(--accent-tint); }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }

/* ---------- Holy AI ---------- */
.ai-box { display: flex; flex-direction: column; height: calc(100dvh - 200px); min-height: 420px; }
.ai-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 14px; }
.ai-bubble { max-width: 78%; font-size: .92rem; line-height: 1.6; padding: 13px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line2); color: var(--ink); align-self: flex-start; white-space: pre-wrap; }
.ai-bubble.me { align-self: flex-end; background: var(--accent); border-color: var(--accent); color: #fff; }
.ai-suggest { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.ai-draft { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line2); border-radius: 16px; padding: 16px; max-width: 78%; }
.draft-list { margin: 0 0 4px 18px; font-size: .88rem; display: flex; flex-direction: column; gap: 4px; }
.draft-save { align-self: flex-start; }

/* ---------- 뷰어 (무대 다크 씬) ---------- */
.viewer-shell {
  position: fixed; inset: 0; z-index: 50; background: var(--viewer-bg);
  display: flex; flex-direction: column;
}
.viewer-top { flex: none; padding: 10px 14px 0; display: flex; flex-direction: column; gap: 8px; z-index: 5; }
.vt-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: var(--black); border-radius: 16px; padding: 8px 10px;
}
.vt-row .title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vt-row .title .t {
  color: #fff; font-weight: 700; font-size: .9rem; letter-spacing: -.01em;
  max-width: min(30vw, 260px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.viewer-top .icon-btn {
  border: 0; background: rgba(255,255,255,.08); color: rgba(255,255,255,.85); cursor: pointer;
  width: 38px; height: 38px; border-radius: 11px; font-size: .95rem;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.viewer-top .icon-btn.active { background: var(--accent); color: #fff; }
/* 버튼 안 SVG(지우개 등)는 터치를 흘려보내 버튼이 항상 탭 대상이 되게 — iOS 사파리에서 SVG가 탭을 가로채 버튼이 안 눌리는 문제 방지 */
.tool-drawer .icon-btn svg, .viewer-top .icon-btn svg { pointer-events: none; }
.viewer-top .icon-btn.lbl { width: auto; padding: 0 12px; gap: 6px; font-size: .78rem; }
.viewer-top .icon-btn.lbl span { font-size: .74rem; }
.save-state { color: rgba(255,255,255,.5); font-size: .74rem; min-width: 52px; text-align: right; }
.tool-drawer {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: rgba(26,24,23,.94); border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px; padding: 10px 12px;
}
.drawer-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pen-colors { display: flex; gap: 7px; align-items: center; }
.pen-color { width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.pen-color.active { box-shadow: 0 0 0 2px var(--viewer-bg), 0 0 0 4px #fff; }
.size-row { display: flex; gap: 5px; align-items: center; }
.size-btn {
  min-width: 40px; height: 30px; border-radius: 9px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.08); display: inline-flex; align-items: center; justify-content: center;
}
.size-btn .dot { background: #fff; border-radius: 50%; display: block; }
.size-btn.active { background: var(--accent); }
.metro-panel, .toc-panel, .sticker-panel, .comp-panel {
  background: rgba(26,24,23,.94); border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px; padding: 14px 16px; color: #fff;
}
.metro-row { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; flex-wrap: wrap; }
.metro-row:last-child { margin-bottom: 0; }
.metro-play {
  width: 46px; height: 46px; border-radius: 14px; border: 0; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 1.1rem; font-weight: 700;
}
.metro-play.on { background: #fff; color: var(--viewer-bg); }
.m-bpm { width: 76px; text-align: center; font-weight: 800; font-size: 1.05rem; background: rgba(255,255,255,.08); border: 0; border-radius: 10px; min-height: 40px; color: #fff; }
.m-lbl { color: rgba(255,255,255,.55); font-size: .78rem; font-weight: 700; }
.metro-panel input[type="range"] { width: 100%; accent-color: var(--accent); }
.m-sub { background: rgba(255,255,255,.08); border: 0; color: rgba(255,255,255,.8); height: 34px; border-radius: 10px; padding: 0 12px; font-size: .78rem; }
.m-sub.active { background: var(--accent); color: #fff; }
.m-share { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: rgba(255,255,255,.75); cursor: pointer; }
.toc-panel { display: flex; flex-direction: column; gap: 2px; max-height: 44dvh; overflow: auto; }
.toc-item {
  display: flex; gap: 10px; align-items: center; border: 0; background: none; cursor: pointer;
  color: #fff; text-align: left; padding: 10px 8px; border-radius: 11px; font: inherit; font-size: .88rem;
}
.toc-item:hover { background: rgba(255,255,255,.07); }
.toc-num { width: 24px; height: 24px; border-radius: 8px; background: rgba(255,255,255,.12); display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; flex: none; }
.toc-bpm { color: var(--accent); font-size: .74rem; font-weight: 700; }
.toc-struct { color: rgba(255,255,255,.45); font-size: .7rem; }
.sticker-panel { display: flex; flex-direction: column; gap: 12px; max-height: 42dvh; overflow: auto; }
.stk-group-title {
  display: block; font-size: .66rem; font-weight: 700; letter-spacing: .06em;
  color: rgba(255,255,255,.45); margin-bottom: 7px;
}
.stk-group-row { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.stk { border: 0; cursor: pointer; height: auto; white-space: nowrap; }
.stk-section { background: #fff; color: #201E1D; border-radius: 7px; padding: 6px 11px; font-size: .78rem; font-weight: 800; letter-spacing: .02em; }
.stk-cue { background: var(--accent); color: #fff; border-radius: 7px; padding: 6px 11px; font-size: .78rem; font-weight: 700; }
.stk-part { background: transparent; color: #fff; border: 1.5px solid #fff; border-radius: 20px; padding: 5px 12px; font-size: .74rem; font-weight: 700; }
.stk-note { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.5); border-radius: 6px; padding: 5px 10px; font-size: .74rem; font-weight: 700; }
.stk.active { outline: 2px solid var(--accent); outline-offset: 2px; }
.structure-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 0 4px; }
.struct-chip { background: rgba(255,255,255,.1); color: #fff; font-size: .72rem; font-weight: 700; border-radius: 7px; padding: 3px 9px; }
.struct-arrow { color: rgba(255,255,255,.3); font-size: .72rem; }
.struct-empty { color: rgba(255,255,255,.4); font-size: .76rem; }
.struct-edit { border: 0; background: rgba(255,255,255,.08); color: rgba(255,255,255,.75); border-radius: 8px; padding: 4px 10px; font-size: .74rem; cursor: pointer; }
.variant-tabs { display: flex; gap: 6px; padding: 0 4px; flex-wrap: wrap; }
.variant-tabs .chip { background: rgba(255,255,255,.08); border-color: transparent; color: rgba(255,255,255,.8); height: 34px; font-size: .78rem; }
.variant-tabs .chip.active { background: var(--accent); color: #fff; }

/* 페이지 구성 편집 패널 */
.comp-panel { display: flex; flex-direction: column; gap: 10px; max-height: 46dvh; overflow: auto; }
.comp-head { display: flex; align-items: center; justify-content: space-between; font-size: .82rem; font-weight: 700; }
.comp-close { border: 0; background: rgba(255,255,255,.1); color: rgba(255,255,255,.8); border-radius: 8px; padding: 5px 11px; font-size: .74rem; cursor: pointer; }
.comp-built { display: flex; flex-wrap: wrap; gap: 6px; min-height: 42px; align-items: center; padding: 9px; background: rgba(255,255,255,.05); border-radius: 12px; }
.comp-built-empty { color: rgba(255,255,255,.4); font-size: .76rem; }
.comp-palette { display: flex; flex-wrap: wrap; gap: 7px; }
.comp-chip { border: 0; cursor: pointer; background: rgba(255,255,255,.1); color: #fff; border-radius: 8px; padding: 7px 13px; font-size: .8rem; font-weight: 700; font-family: inherit; }
.comp-chip.built { background: var(--accent); }
.comp-x { opacity: .8; font-size: .7rem; }
.comp-actions { display: flex; gap: 8px; }

/* 페이지 구성 배지 (악보 상단 가운데 · 테마 반전 · 열고 닫기) */
.comp-badge {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 6;
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap; justify-content: center;
  max-width: 90%; padding: 5px 11px; border-radius: 9px; cursor: pointer; user-select: none;
  background: #201E1D; color: #fff; font-size: .72rem;
  box-shadow: 0 3px 12px rgba(0,0,0,.3); border: 1px solid rgba(0,0,0,.12);
}
:root[data-theme="dark"] .comp-badge { background: #fff; color: #201E1D; border-color: rgba(0,0,0,.18); }
.comp-badge.collapsed { padding: 5px 13px; }
.comp-badge-tog { font-weight: 800; font-size: .66rem; letter-spacing: .03em; opacity: .7; }
.comp-badge .comp-seq { font-weight: 700; }
.comp-badge .comp-seq:not(:last-child)::after { content: '›'; margin-left: 5px; opacity: .4; }

/* 연주 모드: 전체화면 + 메트로놈·구성 토글만 (나머지 도구/패널 숨김) */
.viewer-shell.perform #t-drawer,
.viewer-shell.perform #t-toc,
.viewer-shell.perform #t-follow,
.viewer-shell.perform #t-comments,
.viewer-shell.perform #t-end,
.viewer-shell.perform #t-perform,
.viewer-shell.perform .tool-drawer,
.viewer-shell.perform .sticker-panel,
.viewer-shell.perform .comp-panel,
.viewer-shell.perform .save-state,
.viewer-shell.perform .presence-row { display: none !important; }
.viewer-shell.perform #t-comp-toggle:not(.active) { opacity: .45; }

.viewer-scroll { flex: 1; overflow: auto; padding: 14px 0 40px; }
.pages-col { display: flex; flex-direction: column; gap: 14px; align-items: center; width: calc(100% * var(--zoom, 1)); margin: 0 auto; }
.pages-col.spread { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 10px; }
.page-wrap { position: relative; width: min(94%, 900px); background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.pages-col.spread .page-wrap { width: min(48%, 760px); }
.page-wrap .base { display: block; width: 100%; height: auto; }
.page-wrap .ink { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; pointer-events: none; }
.page-wrap.drawing .ink { pointer-events: auto; }
.page-num {
  position: absolute; right: 10px; bottom: 8px; background: rgba(26,24,23,.75); color: #fff;
  font-size: .68rem; font-weight: 600; border-radius: 8px; padding: 2px 9px; pointer-events: none;
}
.setlist-nav { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 18px 0 8px; color: rgba(255,255,255,.6); font-size: .85rem; }
.setlist-nav .btn { background: rgba(255,255,255,.08); border-color: transparent; color: #fff; }
.text-input-float {
  position: fixed; z-index: 70; background: #fff; border: 2px solid var(--accent);
  border-radius: 10px; padding: 8px 12px; font-size: 1rem; min-width: 220px; outline: none;
}
.pointer-ping {
  position: absolute; width: 40px; height: 40px; border-radius: 50%; z-index: 6;
  transform: translate(-50%, -50%); pointer-events: none;
  border: 3px solid #F0B429; animation: ping 2.4s ease-out;
  box-shadow: 0 0 24px rgba(240,180,41,.65);
}
@keyframes ping { 0% { transform: translate(-50%,-50%) scale(.4); opacity: 1; } 100% { transform: translate(-50%,-50%) scale(2.1); opacity: 0; } }
.presence-row { display: inline-flex; align-items: center; }
.pres-wrap { margin-left: -7px; border-radius: 50%; border: 2px solid var(--black); display: inline-flex; }
.pres-wrap:first-child { margin-left: 0; }
.pres-wrap.md { border-color: var(--accent); }
.presence-n { color: rgba(255,255,255,.55); font-size: .72rem; margin-left: 7px; }

/* 합주 채팅 오버레이 */
.chat-overlay {
  position: absolute; right: 16px; bottom: 18px; z-index: 8;
  width: min(340px, 86vw); max-height: 46dvh;
  display: flex; flex-direction: column;
  background: rgba(26,24,23, calc(var(--chat-alpha, .86)));
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px; overflow: hidden; color: #fff;
}
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: .78rem; font-weight: 700; }
.chat-head input[type="range"] { flex: 1; accent-color: var(--accent); }
.chat-x { border: 0; background: none; color: rgba(255,255,255,.6); cursor: pointer; font-size: .85rem; }
.chat-overlay .chat-msgs { padding: 0 12px; flex: 1; }
.chat-overlay .bubble { background: rgba(255,255,255,.1); border: 0; color: #fff; }
.chat-overlay .chat-msg.me .bubble { background: var(--accent); }
.chat-overlay .who { color: rgba(255,255,255,.6); }
.chat-input-row { padding: 10px 12px; }
.chat-input {
  flex: 1; background: rgba(255,255,255,.1); border: 0; border-radius: 11px;
  min-height: 40px; padding: 8px 12px; color: #fff; outline: none; font-size: .88rem;
}
.chat-input::placeholder { color: rgba(255,255,255,.4); }
.chat-send { border: 0; background: var(--accent); color: #fff; width: 40px; border-radius: 11px; cursor: pointer; font-size: 1rem; }

.comments-panel {
  position: absolute; right: 0; top: 0; bottom: 0; z-index: 9;
  width: min(400px, 94vw); background: var(--card); color: var(--ink);
  display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(0,0,0,.4);
  animation: slide-in .2s ease;
}
.comments-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.comments-head h3 { font-size: 1rem; }
.comments-list { flex: 1; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 13px; }
.comment { display: flex; gap: 10px; }
.comment .body { flex: 1; min-width: 0; }
.comment .who { display: flex; gap: 8px; align-items: baseline; font-size: .8rem; }
.comment .who span { color: var(--faint); font-size: .7rem; }
.comment .text { font-size: .88rem; margin-top: 2px; white-space: pre-wrap; color: var(--ink); }
.comments-input { display: flex; gap: 8px; padding: 12px 16px calc(12px + var(--safe-bottom)); border-top: 1px solid var(--line); }
.comments-input .input { min-height: 44px; }

/* ---------- 다크 모드 (앱 전체 — 웜 다크) ---------- */
:root[data-theme="dark"] {
  --bg: #171514;
  --card: #201E1D;
  --ink: #F5F3F2;
  --text: #DEDBD9;
  --muted: #A6A29F;
  --faint: #7A7674;
  --line: #2E2B29;
  --line2: #3A3634;
  --accent-tint: #3A241E;
  --accent-line: #5C3128;
  --accent-deep: #E39A8C;
  --shadow: none;
}
:root[data-theme="dark"] body { background: var(--bg); color: var(--text); }
:root[data-theme="dark"] .topbar { background: var(--card); border-color: var(--line); }
:root[data-theme="dark"] .icon-sq, :root[data-theme="dark"] .bell-btn { background: #2E2B29; color: var(--ink); }
:root[data-theme="dark"] .icon-sq.dark { background: #F5F3F2; color: #201E1D; }
:root[data-theme="dark"] .btn { background: #2E2B29; border-color: #3A3634; color: var(--ink); }
:root[data-theme="dark"] .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .btn.accent { background: #F5F3F2; border-color: #F5F3F2; color: #201E1D; }
:root[data-theme="dark"] .input, :root[data-theme="dark"] select.input, :root[data-theme="dark"] textarea.input { background: #2E2B29; border-color: #3A3634; color: var(--ink); }
:root[data-theme="dark"] .chip { background: #2E2B29; border-color: #3A3634; color: var(--text); }
:root[data-theme="dark"] .chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .badge { background: #2E2B29; box-shadow: inset 0 0 0 1px #3A3634; color: var(--text); }
:root[data-theme="dark"] .quick-ico { background: #F5F3F2; color: #201E1D; }
:root[data-theme="dark"] .songlist-item .num, :root[data-theme="dark"] .count-pill,
:root[data-theme="dark"] .file-item, :root[data-theme="dark"] .stepper button { background: #2E2B29; }
:root[data-theme="dark"] .chat-msgs.static { background: #171514; }
:root[data-theme="dark"] .chat-msg .bubble { background: #2E2B29; border-color: #3A3634; }
:root[data-theme="dark"] .chat-msg.me .bubble { background: var(--accent); border-color: var(--accent); }
:root[data-theme="dark"] .member-pick-item { background: #262322; }
:root[data-theme="dark"] .room-cell:hover { background: #262322; }
:root[data-theme="dark"] .room-block { background: var(--card); border-color: #F5F3F2; color: var(--ink); }
:root[data-theme="dark"] .room-block.logo { background: #F5F3F2; border-color: #F5F3F2; color: #201E1D; }
:root[data-theme="dark"] .room-block.logo .sub { color: rgba(32,30,29,.6); }
:root[data-theme="dark"] .room-block.logo .brandmark { color: #201E1D; }
:root[data-theme="dark"] .ai-bubble { background: var(--card); border-color: #3A3634; }
:root[data-theme="dark"] .ai-bubble.me { background: var(--accent); border-color: var(--accent); }
:root[data-theme="dark"] .hero { box-shadow: none; border: 1px solid #2E2B29; }
:root[data-theme="dark"] .hero-open { background: #F5F3F2; }
:root[data-theme="dark"] .toast { background: #F5F3F2; color: #201E1D; }
:root[data-theme="dark"] .toast.error { background: var(--accent); color: #fff; }
:root[data-theme="dark"] .modal { background: var(--card); }
:root[data-theme="dark"] .comments-panel { background: var(--card); color: var(--ink); }
:root[data-theme="dark"] .notif-row.unread { background: var(--accent-tint); }
:root[data-theme="dark"] .cal-cell { background: var(--card); }
:root[data-theme="dark"] .cal-cell.dim { background: transparent; }
:root[data-theme="dark"] .cal-cell.selected { background: var(--accent-tint); }
:root[data-theme="dark"] .live-banner { background: var(--accent-tint); }
:root[data-theme="dark"] .quick-card.tint { background: var(--accent-tint); }
:root[data-theme="dark"] .hcard.bday.today { background: var(--accent-tint); }
:root[data-theme="dark"] .mini-tag { background: var(--accent-tint); color: var(--accent-deep); }

/* ---------- 반응형 ---------- */
@media (max-width: 640px) {
  .page-head h1 { font-size: 1.22rem; }
  .hero { padding: 22px 20px 20px; }
  .hero h2 { font-size: 1.25rem; }
  .song-grid { grid-template-columns: 1fr; }
}

/* ---------- 📖 성경 화면 ---------- */
.bible-screen { display: flex; flex-direction: column; max-width: 820px; margin: 0 auto; }
.bible-top { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.bible-ref-btn {
  flex: 1; min-width: 0; height: 44px; border-radius: 13px; background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line2); border: 0; cursor: pointer;
  display: flex; align-items: center; gap: 8px; padding: 0 14px; font-family: inherit;
}
.bible-ref-btn b { font-size: 15.5px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.bible-ref-btn .caret { color: var(--faint); font-size: 13px; }
.bible-search { margin-bottom: 12px; }
.bible-search .notice-meta { margin-top: 8px; }
.bible-chapters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 12px; }
.bible-chapters .chip { flex: none; min-width: 40px; }
.bible-paper { background: var(--card); border-radius: 18px; padding: 14px 12px; box-shadow: 0 1px 2px rgba(32,30,29,.05); }
.bible-line {
  display: flex; gap: 10px; padding: 9px 10px; border-radius: 12px; cursor: pointer;
  user-select: none; -webkit-user-select: none; transition: background .15s ease;
}
.bible-line.on { background: var(--accent-tint); }
.bible-line .n { font-size: 12px; font-weight: 800; width: 20px; flex: none; padding-top: 4px; color: var(--accent); }
.bible-line.on .n { color: var(--accent-deep); }
.bible-line .t { flex: 1; font-size: 15.5px; line-height: 27px; color: var(--ink); }
.bible-result {
  display: block; width: 100%; text-align: left; background: var(--card); border: 0; cursor: pointer;
  border-radius: 16px; padding: 15px 16px; box-shadow: 0 1px 2px rgba(32,30,29,.05);
  margin-bottom: 8px; font-family: inherit;
}
.bible-result .bible-ref { display: block; font-size: 12.5px; font-weight: 700; color: var(--accent); }
.bible-result .bible-text { display: block; font-size: 14.5px; line-height: 24px; color: var(--ink); margin-top: 6px; }
.bible-selbar {
  position: sticky; bottom: calc(env(safe-area-inset-bottom, 0px) + 74px); margin-top: 14px;
  background: var(--black); border-radius: 16px; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px; color: #fff; font-size: 13.5px;
  box-shadow: 0 12px 30px -12px rgba(32,30,29,.55); z-index: 5;
}
@media (min-width: 641px) { .bible-selbar { bottom: 18px; } }
.seg-tabs { display: flex; gap: 6px; background: var(--line); border-radius: 12px; padding: 4px; flex: none; }
.seg-tab {
  padding: 8px 14px; border-radius: 9px; font-size: 13px; font-weight: 700; cursor: pointer;
  border: 0; background: transparent; color: var(--muted); font-family: inherit; transition: background .15s ease;
}
.seg-tab.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(32,30,29,.12); }
.bible-bookgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 7px;
  margin-top: 14px; max-height: 55vh; overflow: auto;
}
.bible-book {
  height: 44px; border-radius: 12px; border: 0; cursor: pointer; font-family: inherit;
  display: grid; place-items: center; font-size: 13px; font-weight: 600; padding: 0 6px;
  background: var(--bg); color: var(--text);
}
.bible-book.on { background: var(--accent-tint); color: var(--accent); }

/* ---------- 💌 초대장 편집기 ---------- */
.iv-editor { max-width: 900px; margin: 0 auto; }
.field-row { display: flex; gap: 10px; flex-wrap: wrap; }
.field-row .grow { flex: 1; min-width: 130px; }
.btn.tint { background: var(--accent-tint); color: var(--accent); border-color: transparent; }
.iv-line { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.iv-line .input { min-width: 0; }
.iv-no { width: 22px; font-size: 12.5px; font-weight: 700; color: var(--faint); flex: none; }
.iv-word-preview {
  margin-top: 4px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); border-radius: 14px; padding: 14px;
}
.iv-word-preview b { font-size: 13px; font-weight: 700; color: var(--accent); }
.iv-word-preview p { font-size: 13.5px; line-height: 22px; color: var(--text); margin-top: 7px; }
.iv-word {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  border-radius: 14px; background: var(--bg); margin-bottom: 8px;
}
.iv-word b { font-size: 13.5px; font-weight: 700; color: var(--ink); display: block; }
.iv-word p { font-size: 12.5px; line-height: 20px; color: var(--muted); margin-top: 4px; }
.iv-footer-preview {
  margin-top: 12px; border-radius: 14px; width: 100%; aspect-ratio: 4 / 1;
  background: var(--black) center/cover no-repeat;
}
.iv-urlbar {
  display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 12px;
  background: var(--line); color: var(--muted); margin-bottom: 12px;
}
.iv-url { font-size: 12px; color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.iv-url-hint { font-size: 11px; color: var(--faint); margin-left: auto; }
.iv-frame {
  width: 100%; height: 72vh; border: 0; border-radius: 22px; background: #1A1817;
  box-shadow: 0 26px 60px -34px rgba(32,30,29,.9);
}
.iv-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--bg); }
.iv-row:last-child { border-bottom: 0; }
.iv-row .iv-open {
  background: none; border: 0; cursor: pointer; text-align: left; font-family: inherit;
  min-width: 0; padding: 0;
}
.iv-row .iv-open b { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.iv-row .iv-row-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

:root[data-theme="dark"] .bible-paper { background: var(--card); }
:root[data-theme="dark"] .bible-book { background: #262322; }
:root[data-theme="dark"] .bible-selbar { background: #F5F3F2; color: #201E1D; }
:root[data-theme="dark"] .seg-tab.active { background: #262322; }

/* ---------- 📲 PWA 설치 안내 시트 (디자인 3e) ---------- */
.pwa-scrim {
  position: fixed; inset: 0; z-index: 60; background: rgba(10,9,9,.62);
  display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease;
}
.pwa-sheet {
  width: 100%; max-width: 560px; background: #2A2726; border-radius: 24px 24px 0 0;
  padding: 22px 22px calc(26px + env(safe-area-inset-bottom, 0px)); animation: up .24s ease; color: #fff;
}
.pwa-grab { width: 38px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.18); margin: 0 auto 18px; }
.pwa-head { display: flex; align-items: center; gap: 14px; }
.pwa-appicon {
  width: 56px; height: 56px; border-radius: 15px; background: #201E1D; flex: none;
  display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); color: #fff;
}
.pwa-appicon .brandmark { width: 26px; height: 26px; position: static; }
.pwa-head b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.pwa-sub { display: block; font-size: 12.5px; line-height: 19px; color: rgba(255,255,255,.5); margin-top: 4px; }
.pwa-perks { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; }
.pwa-perks div { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: rgba(255,255,255,.62); }
.pwa-steps { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.pwa-step {
  display: flex; align-items: center; gap: 9px; font-size: 13px; color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.05); border-radius: 12px; padding: 11px 13px;
}
.pwa-step svg { color: #EC3013; flex: none; }
.pwa-step-no {
  width: 20px; height: 20px; border-radius: 10px; background: rgba(236,48,19,.2); color: #EC3013;
  font-size: 11.5px; font-weight: 800; display: grid; place-items: center; flex: none;
}
.pwa-actions { display: flex; gap: 9px; margin-top: 20px; }
.pwa-later {
  flex: 1; height: 52px; border: 0; border-radius: 14px; background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.7); font-size: 14.5px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.pwa-go {
  flex: 1.5; height: 52px; border: 0; border-radius: 14px; background: var(--accent);
  color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit;
}
@keyframes fade { from { opacity: 0; } }

/* ---------- 프로필: 사진 클릭 업로드 + 자기소개 ---------- */
.me-photo-btn { position: relative; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; flex: none; }
.me-photo-btn:active { transform: scale(.96); }
.me-photo-cam {
  position: absolute; right: 0; bottom: 2px; width: 28px; height: 28px; border-radius: 14px;
  background: var(--black); display: grid; place-items: center;
  box-shadow: 0 0 0 2.5px var(--card);
}
.profile-bio {
  background: var(--bg); border-radius: 13px; padding: 12px 14px; margin-bottom: 14px;
  font-size: .88rem; line-height: 1.55; color: var(--text); white-space: pre-wrap; word-break: break-word;
}
.bible-chapters { cursor: grab; }
.bible-chapters:active { cursor: grabbing; }

/* 초대장 편집기 행 삭제(✕) 버튼 — 기본 브라우저 버튼(흰 박스)으로 뜨던 문제 */
.iv-line .del, .iv-word .del, .iv-row .del {
  width: 34px; height: 34px; flex: none; border: 0; border-radius: 11px;
  background: var(--bg); color: var(--muted); cursor: pointer; font-size: .8rem;
  display: grid; place-items: center; transition: transform .12s ease;
  font-family: inherit; padding: 0;
}
.iv-line .del:active, .iv-word .del:active, .iv-row .del:active { transform: scale(.9); }
:root[data-theme="dark"] .iv-line .del,
:root[data-theme="dark"] .iv-word .del,
:root[data-theme="dark"] .iv-row .del { background: #262322; color: #A6A29F; }

/* ---------- ✨ Holy AI 개편: 레이아웃 · 아바타 · 첨부 · 세션 ---------- */
.ai-layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 16px; max-width: 1060px; margin: 0 auto; align-items: start; }
.ai-side { padding: 14px; position: sticky; top: 78px; }
.ai-sess-btn { display: none; }
@media (max-width: 900px) {
  .ai-layout { display: block; }
  .ai-side { display: none; }
  .ai-sess-btn { display: inline-flex; }
}
.ai-sess-list { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.ai-sess { border: 0; background: none; text-align: left; padding: 10px; border-radius: 12px; cursor: pointer; font: inherit; min-width: 0; }
.ai-sess:hover { background: var(--bg); }
.ai-sess.on { background: var(--accent-tint); }
.ai-sess b { display: block; font-size: .84rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-sess span { font-size: .7rem; color: var(--faint); }
.ai-sess-note { font-size: .72rem; color: var(--faint); line-height: 1.5; margin-top: 12px; }
.ai-box { padding: 16px; }
.chat-ava { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; }
.chat-ava.mark { background: var(--black); display: grid; place-items: center; border-radius: 11px; }
.chat-ava.mark .brandmark { width: 15px; height: 15px; color: #fff; position: static; }
.bubble-copy {
  display: block; border: 0; background: none; color: var(--faint); cursor: pointer;
  padding: 6px 0 0; margin-top: 4px; line-height: 1;
}
.bubble-copy:hover { color: var(--ink); }
.ai-attach { flex: none; width: 46px; height: 46px; border-radius: 13px; }
.ai-att-preview { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 10px; }
.ai-att-chip {
  display: inline-flex; align-items: center; gap: 7px; background: var(--bg);
  border-radius: 10px; padding: 5px 8px; font-size: .76rem; color: var(--text); max-width: 210px;
}
.ai-att-chip img { width: 28px; height: 28px; border-radius: 7px; object-fit: cover; }
.ai-att-chip em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-att-chip button { border: 0; background: none; color: var(--faint); cursor: pointer; flex: none; padding: 2px; }
.chat-atts { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chat-att-img { max-width: 200px; max-height: 200px; border-radius: 10px; display: block; }
.chat-att-file { font-size: .78rem; background: rgba(32,30,29,.07); border-radius: 8px; padding: 4px 9px; }
.chat-msg.me .chat-att-file { background: rgba(255,255,255,.22); }

/* ---------- 홈 하단 팀 배너 ---------- */
.home-banner { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-pop); }
.home-banner img { width: 100%; display: block; }

/* ---------- 악보 리스트 (디자인: 행 구성) ---------- */
.song-list { display: flex; flex-direction: column; gap: 10px; }
.song-row {
  display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 16px;
  padding: 14px 16px; cursor: pointer; box-shadow: 0 1px 2px rgba(32,30,29,.05);
  transition: transform .12s ease;
}
.song-row:active { transform: scale(.99); }
.song-row .fav-star { flex: none; }
.song-thumb {
  width: 48px; height: 60px; border-radius: 8px; background: var(--bg); flex: none;
  background-image: repeating-linear-gradient(var(--bg) 0 12px, var(--line) 12px 13px);
  background-size: 70% auto; background-position: center; background-repeat: no-repeat;
}
.song-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.song-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.song-title b { font-size: .96rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-sub { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-sub2 { font-size: .72rem; color: var(--accent-deep); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-edit-btn {
  flex: none; width: 32px; height: 32px; border: 0; border-radius: 10px; background: none;
  color: var(--faint); cursor: pointer; display: grid; place-items: center;
}
.song-edit-btn:hover { color: var(--ink); background: var(--bg); }
.song-play {
  flex: none; width: 34px; height: 34px; border: 0; border-radius: 17px; cursor: pointer;
  display: grid; place-items: center; background: var(--bg); color: var(--text);
}
.song-play:not(.off):hover { background: var(--accent); color: #fff; }
.song-play.off { opacity: .3; cursor: default; }

:root[data-theme="dark"] .ai-sess:hover { background: #262322; }
:root[data-theme="dark"] .chat-att-file { background: rgba(255,255,255,.09); }
:root[data-theme="dark"] .song-thumb { background-image: repeating-linear-gradient(#262322 0 12px, #3A3634 12px 13px); }
:root[data-theme="dark"] .song-play { background: #262322; }

/* ---------- 콘티 리디자인 (디자인: 2열 카드 + 버전 칩 / 만들기 모달 / 상세) ---------- */
.sl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.sl-card { padding: 18px; cursor: pointer; transition: transform .12s ease; }
.sl-card:active { transform: scale(.99); }
.sl-card h3 { font-size: 1.02rem; font-weight: 700; color: var(--ink); }
.sl-card .sub { display: block; font-size: .8rem; color: var(--muted); margin-top: 4px; }
.sl-card .sl-vers { margin-top: 12px; gap: 6px; }
.sl-bpm { font-size: .78rem; color: var(--muted); flex: none; min-width: 56px; text-align: right; }
.sl-past-toggle {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  background: var(--bg); border: 0; border-radius: 14px; padding: 14px 16px;
  cursor: pointer; font: inherit; margin-bottom: 10px;
}
.sl-past-toggle b { font-size: .92rem; color: var(--ink); display: block; }
.sl-past-toggle .sub { font-size: .76rem; color: var(--muted); display: block; margin-top: 2px; }
.sl-past-toggle .caret { color: var(--faint); }
.sl-past-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.sl-past-row {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--line);
  border-radius: 13px; padding: 11px 14px;
}
.sl-past-row.on { border-color: var(--accent); background: var(--accent-tint); }
.sl-past-row b { font-size: .88rem; color: var(--ink); display: block; }
.sl-past-row .sub { font-size: .74rem; color: var(--muted); display: block; margin-top: 2px; }
:root[data-theme="dark"] .sl-past-toggle { background: #262322; }

/* ---------- 예배 리디자인 (디자인: 날짜 블록 행 / 상세 / 만들기) ---------- */
.w-list { display: flex; flex-direction: column; gap: 10px; }
.w-row { display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; transition: transform .12s ease; }
.w-row:active { transform: scale(.99); }
.w-row.ended { opacity: .6; }
.w-date { flex: none; width: 44px; text-align: center; }
.w-date small { display: block; font-size: .68rem; color: var(--faint); font-weight: 600; }
.w-date b { display: block; font-size: 1.25rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.w-title { display: block; font-size: .96rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-sub { display: block; font-size: .78rem; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-sub em { font-style: normal; color: var(--accent-deep); }
.w-kind { display: inline-block; font-size: .68rem; font-weight: 800; color: #fff; background: var(--ink); border-radius: 6px; padding: 1px 6px; vertical-align: middle; letter-spacing: .01em; }
.w-sl-pick { display: flex; flex-direction: column; gap: 8px; }
.w-sl-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit;
  border: 1px solid var(--line); background: var(--card); border-radius: 13px; padding: 13px 15px; cursor: pointer;
}
.w-sl-opt b { display: block; font-size: .9rem; color: var(--ink); }
.w-sl-opt .sub { display: block; font-size: .75rem; color: var(--muted); margin-top: 2px; }
.w-sl-opt .w-radio {
  width: 18px; height: 18px; border-radius: 9px; flex: none;
  box-shadow: inset 0 0 0 1.5px var(--line2); background: var(--card); transition: all .15s ease;
}
.w-sl-opt.on { border-color: var(--accent); background: var(--accent-tint); }
.w-sl-opt.on .w-radio { background: var(--accent); box-shadow: inset 0 0 0 4.5px var(--accent-tint); }
.w-members { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow: auto; }
.w-member {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit;
  border: 0; background: var(--bg); border-radius: 13px; padding: 10px 13px; cursor: pointer;
}
.w-member b { display: block; font-size: .9rem; color: var(--ink); }
.w-member .sub { display: block; font-size: .74rem; color: var(--muted); margin-top: 1px; }
.w-member .w-check {
  width: 24px; height: 24px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--line2); color: rgba(255,255,255,.7); font-size: .72rem; font-weight: 800; transition: background .15s ease;
}
.w-member.on { background: var(--accent-tint); }
.w-member.on .w-check { background: var(--accent); color: #fff; }
.w-member:disabled { cursor: default; }
.w-member-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.w-mchip {
  display: inline-flex; align-items: center; gap: 8px; background: var(--bg);
  border-radius: 12px; padding: 8px 12px 8px 8px;
}
.w-mchip b { font-size: .84rem; color: var(--ink); }
.w-mchip .sub { font-size: .74rem; color: var(--muted); }
:root[data-theme="dark"] .w-member { background: #262322; }
:root[data-theme="dark"] .w-mchip { background: #262322; }

/* ---------- 참석 여부(RSVP) ---------- */
.rsvp-counts { font-size: .8rem; color: var(--muted); }
.rsvp-counts b { color: var(--ink); }
.wrsvp-btns { display: flex; gap: 8px; margin: 4px 0 2px; }
.wrsvp-btn {
  flex: 1; min-height: 44px; border: 1.5px solid var(--line); background: var(--card);
  border-radius: 13px; font: inherit; font-size: .9rem; font-weight: 600; color: var(--ink); cursor: pointer;
}
.wrsvp-btn.on.yes { background: #12A150; border-color: #12A150; color: #fff; }
.wrsvp-btn.on.maybe { background: #E5A200; border-color: #E5A200; color: #fff; }
.wrsvp-btn.on.no { background: var(--accent); border-color: var(--accent); color: #fff; }
.rsvp-lists { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.rsvp-grp { display: flex; flex-direction: column; gap: 7px; }
.rsvp-lbl { font-size: .74rem; font-weight: 700; }
.rsvp-lbl.going { color: #12A150; }
.rsvp-lbl.maybe { color: #C98A00; }
.rsvp-lbl.no { color: var(--accent); }
:root[data-theme="dark"] .wrsvp-btn { background: #262322; }

/* ---------- 키 조옮김(Transpose) ---------- */
.key-badge.key-tp { cursor: pointer; }
.key-badge.key-tp:hover { outline: 2px solid var(--accent); outline-offset: 1px; }
.tp-row { display: flex; align-items: flex-end; gap: 10px; margin: 6px 0 14px; }
.tp-sel { display: flex; flex-direction: column; gap: 6px; font-size: .76rem; color: var(--muted); flex: 1; }
.tp-sel select {
  font: inherit; font-size: 1.1rem; font-weight: 700; color: var(--ink);
  padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card);
}
.tp-eq { font-size: 1.2rem; color: var(--accent); padding-bottom: 10px; }
.tp-summary { display: flex; gap: 10px; margin-bottom: 12px; }
.tp-summary > div { flex: 1; background: var(--bg); border-radius: 13px; padding: 12px 14px; }
.tp-summary small { display: block; font-size: .7rem; color: var(--faint); margin-bottom: 4px; }
.tp-summary b { font-size: 1rem; color: var(--ink); }
.tp-hint { font-size: .78rem; color: var(--muted); margin-bottom: 10px; }
.tp-map { display: grid; grid-template-columns: 1fr auto 1fr; gap: 4px 8px; align-items: center; }
.tp-cell {
  text-align: center; padding: 6px 4px; border-radius: 8px; font-weight: 600; font-size: .9rem;
  color: var(--ink); background: var(--bg);
}
.tp-cell.to { color: var(--accent); font-weight: 800; }
.tp-cell.hi { background: var(--tint); }
.tp-arrow { color: var(--faint); font-size: .8rem; text-align: center; }
:root[data-theme="dark"] .tp-sel select, :root[data-theme="dark"] .tp-summary > div, :root[data-theme="dark"] .tp-cell { background: #262322; }
:root[data-theme="dark"] .w-sl-opt { background: var(--card); }

/* ---------- 마이페이지 리디자인 (다크 히어로 + 읽기 전용 정보) ---------- */
.me-hero { background: var(--black); border-radius: 22px; padding: 20px; color: #fff; box-shadow: var(--shadow-pop); }
.me-hero-top { display: flex; align-items: center; gap: 14px; }
.me-hero-top b { display: block; font-size: 1.08rem; font-weight: 700; }
.me-hero-sub { display: block; font-size: .78rem; color: rgba(255,255,255,.55); margin-top: 3px; }
.me-hero-edit { background: rgba(255,255,255,.1); border-color: transparent; color: #fff; flex: none; }
.me-hero-complete { flex: none; white-space: nowrap; }
.me-hero .me-photo-cam { box-shadow: 0 0 0 2.5px var(--black); background: var(--accent); }
.me-hero-body { margin-top: 18px; }
.me-hero-row { display: flex; align-items: flex-end; gap: 12px; }
.me-hero-row small, .me-hero-lv small { display: block; font-size: .7rem; color: rgba(255,255,255,.5); margin-bottom: 4px; }
.me-hero-row b { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.me-hero-lv { text-align: right; flex: none; }
.me-hero-lv b { font-size: 1.35rem; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.me-hero-line { height: 3px; border-radius: 2px; background: var(--accent); margin: 12px 0 10px; }
.me-hero-body p { font-size: .74rem; color: rgba(255,255,255,.45); }
.me-ro-label { display: block; font-size: .76rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.me-ro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.me-ro-box { background: var(--bg); border-radius: 13px; padding: 12px 14px; min-width: 0; }
.me-ro-box small { display: block; font-size: .7rem; color: var(--faint); margin-bottom: 4px; }
.me-ro-box b { font-size: .92rem; color: var(--ink); font-weight: 600; word-break: break-all; }
.me-insta-row {
  display: flex; align-items: center; gap: 9px; background: var(--bg); border-radius: 13px;
  padding: 13px 14px; margin-top: 10px; text-decoration: none; color: var(--ink);
}
.me-insta-row b { font-size: .9rem; }
.me-insta-row span { margin-left: auto; font-size: .78rem; color: var(--muted); }
.pref-card { padding: 20px; }
.me-row-btn {
  display: block; width: 100%; text-align: left; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: .94rem; color: var(--ink); padding: 15px 0; border-bottom: 1px solid var(--bg);
}
.me-row-btn:last-child { border-bottom: 0; }
.me-row-btn.danger { color: var(--accent); }

/* ---------- 설정 리디자인: 리더십 행 + 초대장 다크 카드 ---------- */
.lead-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--bg); }
.lead-row:last-child { border-bottom: 0; }
.lead-row > .grow > b { font-size: .92rem; color: var(--ink); }
.lead-badges { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.lead-row .btn { flex: none; }
.iv-promo { background: var(--black); color: #fff; padding: 20px; box-shadow: var(--shadow-pop); }
.iv-promo p { font-size: .8rem; color: rgba(255,255,255,.55); margin-top: 6px; line-height: 1.5; }
.iv-promo-copy { background: rgba(255,255,255,.1); border-color: transparent; color: #fff; }
.iv-promo-list { margin-top: 8px; }
:root[data-theme="dark"] .me-hero { border: 1px solid #2E2B29; box-shadow: none; }
:root[data-theme="dark"] .me-ro-box, :root[data-theme="dark"] .me-insta-row { background: #262322; }
