/* V51 직업 글쓰기 웹앱 공통 스타일 — 직업별 색은 설정 파일의 theme 값이 덮어쓴다.
   디자인 원칙(2026-11-05 개편): 원고는 '한 장의 종이'. 칸 이름은 왼쪽 여백에, 글은 오른쪽에.
   도구는 조용히, 강조색은 주된 동작과 지금 쓰는 자리에만. 외부 글꼴·요청 없음(시스템 글꼴).
   색은 pinlogue 사이트 테마(wp-theme/pinlogue)와 같은 계열. */
:root {
  --accent: #5b4b8a;
  --accent-deep: #463970;
  --accent-soft: #ece7f6;
  --accent-ink: #5b4b8a;           /* 글자로 쓰는 강조색(어두운 화면에서 밝게) */
  --mark: #f2c14e;
  --bg: #f4f1eb;                   /* 책상 */
  --panel: #fbfaf7;                /* 옆 칸 */
  --sheet: #ffffff;                /* 원고 종이 */
  --text: #1f1d24;
  --muted: #6a6573;
  --line: #e6e0d6;
  --line-strong: #d6cfc2;
  --danger: #b3261e;
  --shadow: 0 1px 2px rgba(31, 29, 36, .05), 0 8px 28px -12px rgba(31, 29, 36, .14);
  --radius: 10px;
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  --serif: "Noto Serif KR", "Nanum Myeongjo", "AppleMyungjo", "Batang", "바탕", serif;
  --top: 56px;
  --ring: 0 0 0 3px rgba(91, 75, 138, .32);   /* color-mix 미지원 브라우저에서도 보이게 고정값 */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131116; --panel: #18161c; --sheet: #1e1b23; --text: #ece9f2; --muted: #a39db0;
    --line: #2f2a37; --line-strong: #3d3747; --accent-soft: #2b2540; --accent-ink: #b8a7ee; --danger: #f2877f;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
/* 사용자가 고른 화면(자동/밝게/어둡게) */
:root[data-theme="dark"] {
  --bg: #131116; --panel: #18161c; --sheet: #1e1b23; --text: #ece9f2; --muted: #a39db0;
  --line: #2f2a37; --line-strong: #3d3747; --accent-soft: #2b2540; --accent-ink: #b8a7ee; --danger: #f2877f;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px -12px rgba(0,0,0,.6);
}
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

/* ---------- 바탕 ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
body { line-height: 1.6; -webkit-font-smoothing: antialiased; font-size: 15px; }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* 집중: 원고만 */
.focus .sidebar, .focus .bible, .focus .footer { display: none !important; }
.focus .layout, .focus .layout.with-bible { grid-template-columns: minmax(0, 1fr); }
/* 집중 화면에서 원고 줄이 화면 끝까지 길어지지 않게(써 보기 발견 2026-11-05) */
.focus .editor { max-width: 980px; margin-inline: auto; width: 100%; }

/* ---------- 단추·입력 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border: 1px solid var(--line-strong); background: var(--sheet); border-radius: 8px;
  font-size: 14px; font-weight: 500; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.btn.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--accent-soft); color: var(--accent-ink); }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); }
.btn.small { height: 30px; padding: 0 10px; font-size: 13px; }
.btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
select.btn, input.btn { font-weight: 400; }
select {
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: right 13px center, right 8px center; background-size: 5px 5px; background-repeat: no-repeat;
  padding-right: 26px !important;
}
input[type="search"], .pf input, .custom-form input, .custom-form textarea, .bible-go input {
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--sheet); padding: 0 10px; height: 34px;
}
.custom-form textarea { height: auto; padding: 8px 10px; }
input[type="search"]:focus, .pf input:focus, .custom-form input:focus, .custom-form textarea:focus, .bible-go input:focus,
select:focus-visible, input.btn:focus-visible { border-color: var(--accent); box-shadow: var(--ring); outline: none; }
.count-note { font-size: 12px; color: var(--muted); font-weight: 400; }
.linkish { border: 0; background: none; padding: 0; color: var(--accent-ink); text-decoration: underline; font-size: inherit; }

/* ---------- 머리 띠 ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px; height: var(--top); padding: 0 16px;
  background: var(--panel); background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 15;
}
.brand { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.brand small { font-weight: 400; color: var(--muted); margin-left: 10px; font-size: 13px; }
.home-link { color: var(--muted); text-decoration: none; font-weight: 600; }
.home-link:hover { color: var(--accent-ink); }
.home-sep { color: var(--line-strong); margin: 0 8px; font-weight: 400; }
.top-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.ai-group { display: inline-flex; align-items: center; height: 34px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--sheet); }
.ai-group:focus-within { border-color: var(--accent); }
.ai-tag { font-size: 11px; font-weight: 700; color: var(--accent-ink); padding: 0 4px 0 10px; letter-spacing: .02em; }
.ai-group select { border: 0; background-color: transparent; height: 32px; padding-left: 4px; font-size: 14px; font-weight: 600; }
.ai-group .btn { height: 26px; margin: 0 3px; border-radius: 6px; padding: 0 10px; background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); font-weight: 600; }
.ai-group .btn:hover { background: var(--accent); color: #fff; }
.saved { font-size: 12px; color: var(--muted); margin-right: 6px; white-space: nowrap; }
.saved.warn { color: var(--danger); font-weight: 600; }

/* 메뉴 */
.menu { position: relative; }
.menu-list {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; background: var(--sheet);
  border: 1px solid var(--line); border-radius: 12px; padding: 6px; min-width: 240px; box-shadow: var(--shadow);
}
.menu-list[hidden] { display: none; }
.view-menu { left: auto; right: 0; min-width: 220px; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.view-menu[hidden] { display: none; }
.menu-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.menu-field select { height: 34px; border: 1px solid var(--line-strong); border-radius: 8px; background-color: var(--sheet); padding: 0 10px; font-size: 14px; color: var(--text); font-weight: 400; }
.menu-list button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 8px; font-size: 14px; }
.menu-list button:hover { background: var(--accent-soft); }
.menu-sep { margin: 6px 4px 2px; padding: 8px 6px 2px; border-top: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--muted); }
.menu-sep small { display: block; font-weight: 400; }
.chapter { width: 9.5em; }
.chapter[hidden] { display: none; }
.menu-list small { color: var(--muted); margin-left: 4px; }

/* ---------- 배치 ---------- */
.layout { display: grid; grid-template-columns: 264px minmax(0, 1fr) 260px; min-height: calc(100vh - var(--top)); }
/* 오른쪽 열(대표 지시 2026-11-05): 위는 성경·자료함 창(열었을 때), 아래는 기능 제안·공유·출판 안내. 왼쪽은 원고 목록만 */
.rail { display: flex; flex-direction: column; min-width: 0; position: sticky; top: var(--top); height: calc(100vh - var(--top));
  border-left: 1px solid var(--line); background: var(--panel); overflow: auto; }
.rail > .bible { position: static; height: auto; flex: 1 1 auto; min-height: 320px; border-left: 0; }
.rail .side-bottom { margin-top: auto; padding: 14px; }
.layout.with-bible .rail .side-bottom { border-top: 1px solid var(--line); }
.focus .rail { display: none !important; }

/* 왼쪽: 원고 목록 */
.sidebar {
  border-right: 1px solid var(--line); background: var(--panel); padding: 16px 14px; display: flex; flex-direction: column; gap: 12px;
  position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow: auto;
}
.sidebar h2 { font-size: 13px; margin: 6px 2px 0; color: var(--muted); font-weight: 600; display: flex; align-items: baseline; gap: 6px; }
.new-row { display: flex; flex-direction: column; gap: 6px; }
.new-row .btn.primary { justify-content: center; height: 38px; font-size: 15px; }
.new-row select, .add-row select {
  min-width: 0; height: 32px; border: 1px solid var(--line); border-radius: 8px; background-color: var(--sheet); padding: 0 10px; font-size: 13px; color: var(--muted);
}
.search, .sort { width: 100%; font-size: 13px; }
.add-row { display: flex; gap: 6px; }
.add-row select { flex: 1; }
.doc-list { list-style: none; margin: 0 -6px; padding: 0; display: flex; flex-direction: column; gap: 2px; overflow: auto; max-height: 50vh; }
.doc-list li button {
  position: relative; width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 12px 9px 14px; border-radius: 8px;
  font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--text);
}
.doc-list li button:hover { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
.doc-list li button.active { background: var(--accent-soft); }
.doc-list li button.active::before { content: ""; position: absolute; left: 4px; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--accent); }
.doc-list .meta { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.doc-list .hit { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 3px; overflow-wrap: anywhere; }
.doc-list .hit em { font-style: normal; color: var(--accent-ink); margin-right: 2px; }
.doc-list mark { background: color-mix(in srgb, var(--mark) 70%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.doc-list > .count-note { padding: 8px 12px; }
.backup { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }
.backup .btn { color: var(--muted); }
.backup .count-note { width: 100%; padding: 0 2px; }
.backup .warn { color: var(--danger); font-weight: 600; }
.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.support { display: flex; flex-wrap: wrap; gap: 6px; }
.support .btn { color: var(--text); }
/* 공유 단추(catmoa 공유 단추 참고: 둥근 알약 단추, 줄바꿈) */
.share { border-top: 1px solid var(--line); padding-top: 10px; margin-bottom: 14px; }  /* 출판 안내와 24px(gap 10 + 14), 오클릭 방지 */
.share-head { margin: 0 2px 8px; font-size: 13px; font-weight: 600; color: var(--text); }
.share-list { display: flex; flex-wrap: wrap; gap: 6px; }
.share-btn { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--sheet); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.share-btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.share-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.share-btn.primary:hover { background: var(--accent-deep); color: #fff; }
.share-btn[hidden] { display: none; }
.share-btn.kakao { background: #fee500; border-color: #fee500; color: #191919; }  /* 카카오 디자인 가이드 노랑 */
.share-btn.kakao:hover { background: #f5dc00; border-color: #f5dc00; color: #191919; }
.share-btn:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.upsell-cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }  /* 보라 카드 위에서도 보이게 */
/* 출판 안내: 눈에 띄게(대표 지시 2026-11-05) — 강조색 바탕 카드, 꽉 찬 흰 단추 */
.upsell { background: linear-gradient(150deg, var(--accent) 0%, var(--accent-deep) 100%); color: #fff; border-radius: 12px; padding: 16px 16px 14px; box-shadow: 0 10px 24px -14px rgba(70, 57, 112, .8); }
.upsell-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--mark); }
.upsell-icon { width: 20px; height: 20px; flex: 0 0 auto; }
.upsell-msg { margin: 8px 0 12px; font-size: 14.5px; font-weight: 600; line-height: 1.55; word-break: keep-all; overflow-wrap: anywhere; }
.upsell-cta { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 12px; border-radius: 9px; background: #fff; color: var(--accent-deep); font-size: 14px; font-weight: 700; text-decoration: none; text-align: center; word-break: keep-all; overflow-wrap: anywhere; transition: transform .15s, background .15s; }
.upsell-cta:hover { background: #f6f3fc; transform: translateY(-1px); }
.ad-wrap { margin-top: 24px; }   /* 출판 안내 등 클릭 요소와 24px 이상(qa-ops ③) */
.ad-label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.ad-slot { border: 1px dashed var(--line); border-radius: var(--radius); min-height: 120px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }

/* ---------- 가운데: 원고 ---------- */
.editor { padding: 22px clamp(16px, 3.5vw, 48px) 72px; width: 100%; min-width: 0; } /* 화면 전체 폭(대표 지시 2026-11-04) */
.doc-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.doc-meta, .doc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.doc-meta select.btn, .doc-meta input.btn { background-color: transparent; border-color: var(--line); color: var(--muted); }
.doc-meta select.btn:hover, .doc-meta input.btn:hover { border-color: var(--line-strong); color: var(--text); }
.doc-actions .btn.danger { margin-left: auto; }
.stats { margin-left: auto; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.stats b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.stats-set { display: inline-flex; align-items: center; gap: 4px; }
.stats .num { width: 64px; height: 26px; padding: 0 6px; text-align: right; background: transparent; border-color: var(--line); }
#target.num { width: 52px; }
#target-note { margin-left: 4px; }
#target-note.over { color: var(--danger); font-weight: 600; }

/* 원고 종이: 칸들이 한 장 위에 이어진다 */
#fields { background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px 0; }
.field { position: relative; padding: 18px 24px 18px 28px; border-top: 1px solid var(--line); background: var(--sheet); }
.field:first-child { border-top: 0; border-radius: 14px 14px 0 0; }
.field:last-child { border-radius: 0 0 14px 14px; }
.field::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 3px 3px 0; background: transparent; transition: background .15s; }
.field:focus-within::before { background: var(--accent); }
.field-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; min-height: 30px; }
.field-head label { font-weight: 700; font-size: 13px; color: var(--muted); letter-spacing: -0.005em; }
.field:focus-within .field-head label { color: var(--accent-ink); }
.field-head .hint { color: var(--muted); font-size: 12px; opacity: .85; }
.field-head .tools { margin-left: auto; display: flex; gap: 2px; align-items: center; }
.field-head .tools .btn { height: 28px; font-size: 12.5px; border-color: transparent; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.field-head .tools .btn:hover { background: var(--accent); color: #fff; }
.field input, .field textarea { width: 100%; border: 0; outline: none; background: transparent; resize: none; padding: 0; box-shadow: none; }
.field textarea { min-height: 56px; overflow: hidden; display: block; }
.field.short textarea { min-height: 30px; }
.field input { font-size: 18px; font-weight: 600; height: 34px; }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
/* 제목은 원고의 첫 줄답게 크게 */
.field[data-type="title"] input { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; height: 42px; }
.field[data-type="passage"] input { font-size: 17px; color: var(--accent-ink); }
/* 성경 본문은 명조 */
.field[data-type="passageText"] textarea { font-family: var(--serif); }
/* 글 크기(사용자 선택, 노안 대비) */
.field textarea { font-size: 16.5px; line-height: 1.8; }
:root[data-size="l"] .field textarea { font-size: 19px; }
:root[data-size="l"] .field input { font-size: 21px; }
:root[data-size="l"] .field[data-type="title"] input { font-size: 30px; height: 46px; }
:root[data-size="xl"] .field textarea { font-size: 23px; }
:root[data-size="xl"] .field input { font-size: 25px; }
:root[data-size="xl"] .field[data-type="title"] input { font-size: 34px; height: 52px; }
:root[data-size="l"] .field-head label { font-size: 15px; }
:root[data-size="xl"] .field-head label { font-size: 17px; }
.passage-note { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.passage-note:empty { display: none; }

/* 칸 도구(옮기기·지우기)는 칸에 올렸을 때·쓸 때만 */
.icon { border: 1px solid transparent; background: none; border-radius: 6px; width: 28px; height: 28px; color: var(--muted); font-size: 13px; }
.icon:hover:not(:disabled) { background: var(--accent-soft); color: var(--text); }
.icon:disabled { opacity: .3; cursor: default; }
.field-head .icon, .grip { opacity: 0; transition: opacity .15s; }
.field:hover .field-head .icon, .field:focus-within .field-head .icon, .field:hover .grip, .field:focus-within .grip, .grip:focus-visible { opacity: 1; }
.field-head .icon:disabled { opacity: 0; }
.field:hover .field-head .icon:disabled, .field:focus-within .field-head .icon:disabled { opacity: .3; }
@media (hover: none) { .field-head .icon, .grip { opacity: 1; } .field-head .icon:disabled { opacity: .3; } }

/* 넓은 원고: 칸 이름을 왼쪽 여백에(설교 개요가 한눈에). 원고 폭이 약 760px 이상일 때.
   container query는 고정 위치 창의 기준 상자를 바꿔 쓰지 않는다(시험 test_app_container_not_on_fixed_ancestors).
   오른쪽 열(260px)이 늘 있으므로 기준을 1120 → 1400px(원고 폭 약 870px)로 올림(2026-11-05). */
@media (min-width: 1400px) {
  .layout:not(.with-bible) .field { display: grid; grid-template-columns: 176px minmax(0, 1fr); column-gap: 24px; padding: 20px 28px 20px 36px; }
  .layout:not(.with-bible) .field-head { flex-direction: column; align-items: flex-start; gap: 6px; margin: 4px 0 0; }
  .layout:not(.with-bible) .field-head label { font-size: 14px; }
  .layout:not(.with-bible) .field-head .tools { margin-left: 0; flex-wrap: wrap; }
  .layout:not(.with-bible) .field > input, .layout:not(.with-bible) .field > textarea, .layout:not(.with-bible) .field > .passage-note { grid-column: 2; align-self: start; }  /* 줄 높이에 늘어나면 자동 높이가 굳는다 */
  .layout:not(.with-bible) .field > .passage-note { margin-top: 6px; }
  .layout:not(.with-bible) .grip { position: absolute; left: 8px; top: 22px; margin: 0 !important; }
}
@media (min-width: 1520px) {
  .layout.with-bible .field { display: grid; grid-template-columns: 176px minmax(0, 1fr); column-gap: 24px; padding: 20px 28px 20px 36px; }
  .layout.with-bible .field-head { flex-direction: column; align-items: flex-start; gap: 6px; margin: 4px 0 0; }
  .layout.with-bible .field-head label { font-size: 14px; }
  .layout.with-bible .field-head .tools { margin-left: 0; flex-wrap: wrap; }
  .layout.with-bible .field > input, .layout.with-bible .field > textarea, .layout.with-bible .field > .passage-note { grid-column: 2; align-self: start; }  /* 줄 높이에 늘어나면 자동 높이가 굳는다 */
  .layout.with-bible .field > .passage-note { margin-top: 6px; }
  .layout.with-bible .grip { position: absolute; left: 8px; top: 22px; margin: 0 !important; }
}
@media (min-width: 880px) {
  .focus .layout .field { display: grid; grid-template-columns: 176px minmax(0, 1fr); column-gap: 24px; padding: 20px 28px 20px 36px; }
  .focus .layout .field-head { flex-direction: column; align-items: flex-start; gap: 6px; margin: 4px 0 0; }
  .focus .layout .field-head label { font-size: 14px; }
  .focus .layout .field-head .tools { margin-left: 0; flex-wrap: wrap; }
  .focus .layout .field > input, .focus .layout .field > textarea, .focus .layout .field > .passage-note { grid-column: 2; align-self: start; }  /* 줄 높이에 늘어나면 자동 높이가 굳는다 */
  .focus .layout .field > .passage-note { margin-top: 6px; }
  .focus .layout .grip { position: absolute; left: 8px; top: 22px; margin: 0 !important; }
}

/* 칸 끌어 옮기기 손잡이 */
.grip { border: 0; background: none; color: var(--muted); cursor: grab; touch-action: none; padding: 0; font-size: 16px; line-height: 1;
  width: 22px; height: 28px; margin-left: -8px; user-select: none; -webkit-user-select: none; border-radius: 6px; }
.grip:hover { color: var(--accent-ink); background: var(--accent-soft); }
.field.dragging { outline: 2px solid var(--accent); box-shadow: 0 12px 32px rgba(0,0,0,.18); opacity: .95; z-index: 2; border-radius: 10px; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }

/* ---------- 오른쪽: 성경(퍼블릭 도메인 개역한글) ---------- */
.layout.with-bible { grid-template-columns: 264px minmax(0, 1fr) minmax(320px, 400px); }
.bible {
  border-left: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px; position: sticky; top: var(--top); height: calc(100vh - var(--top)); min-width: 0;
}
.bible[hidden] { display: none; }
.bible-head { display: flex; align-items: baseline; gap: 8px; }
.bible-head strong { font-size: 15px; }
.bible-head .icon { margin-left: auto; align-self: center; }
.bible-ver { font-size: 12px; color: var(--muted); }
.bible-note { margin: 0; font-size: 12.5px; color: var(--accent-ink); background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; line-height: 1.5; }
.bible-note small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.bible-mode, .bible-parts { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; align-self: flex-start; }
.bible-mode .seg, .bible-parts .seg { border: 0; background: var(--sheet); color: var(--muted); font: inherit; font-size: 13px; padding: 5px 14px; cursor: pointer; }
.bible-parts .seg { padding: 3px 10px; font-size: 12.5px; }
.bible-mode .seg + .seg, .bible-parts .seg + .seg { border-left: 1px solid var(--line-strong); }
.bible-mode .seg[aria-pressed="true"], .bible-parts .seg[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }
.bible-mode .seg:focus-visible, .bible-parts .seg:focus-visible { outline: none; box-shadow: var(--ring); }
.bible-back { align-self: flex-start; }
.bible-back[hidden] { display: none; }
.bible-hits-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 8px 6px; font-size: 13px; color: var(--muted); }
.bible-hits-head strong { color: var(--text); font-size: 14px; }
.bible-hits { list-style: none; margin: 0; padding: 0; }
.bible-hit { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--text); padding: 7px 8px; border-radius: 6px; cursor: pointer; font-family: var(--serif); font-size: 14.5px; line-height: 1.7; }
.bible-hit:hover, .bible-hit:focus-visible { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); outline: none; }
.bible-hit .hit-ref { display: inline-block; min-width: 4.6em; margin-right: 6px; color: var(--accent-ink); font: 700 12px/1 var(--font); font-variant-numeric: tabular-nums; }
.bible-hit mark { background: color-mix(in srgb, var(--mark) 45%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.bible-go { display: flex; gap: 6px; }
.bible-go input { flex: 1; min-width: 0; }
.bible-nav { display: flex; gap: 6px; align-items: center; }
.bible-nav select { flex: 1; min-width: 0; height: 32px; border: 1px solid var(--line-strong); background-color: var(--sheet); border-radius: 8px; padding: 0 8px; font-size: 13px; }
.bible-text { flex: 1; overflow: auto; background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px 12px; }
.bible-text h4 { margin: 10px 8px 6px; font-size: 16px; font-family: var(--serif); font-weight: 700; }
.bible-title { margin: 0 8px 8px; font-size: 12.5px; color: var(--muted); }
.bible-text .verse { margin: 0; padding: 4px 8px; border-radius: 6px; cursor: pointer; line-height: 1.75; font-family: var(--serif); font-size: 15px; }
.bible-text .verse:hover { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
.bible-text .verse.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.bible-text sup { color: var(--accent-ink); font-weight: 700; margin-right: 5px; font-size: 10.5px; font-family: var(--font); }
.bible-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bible-actions .count-note { flex-basis: 100%; }
@media (max-width: 1100px) {
  .layout.with-bible { grid-template-columns: 220px minmax(0, 1fr) 320px; }
  .layout { grid-template-columns: 232px minmax(0, 1fr) 220px; }
  .brand small { display: none; }
}
@media (min-width: 761px) and (max-width: 900px) {
  .layout, .layout.with-bible { grid-template-columns: 220px minmax(0, 1fr); }
  .sidebar { grid-row: span 2; }
}
@media (max-width: 900px) {
  /* 좁은 화면: 오른쪽 열은 원고 아래로(성경·자료함은 덮는 창) */
  .rail { grid-column: auto; position: static; height: auto; overflow: visible; border-left: 0; border-top: 1px solid var(--line); background: transparent; }
  .rail .side-bottom { padding: 16px 14px 24px; }
}
@media (max-width: 900px) {
  /* 좁은 화면: 성경은 화면 위에 덮는 창 */
  .bible, .rail > .bible { position: fixed; inset: 0; top: 0; height: 100vh; height: 100dvh; min-height: 0; z-index: 30; border-left: 0; }
}

/* AI 답 자료함(config.library): 성경 창과 같은 자리·틀 */
.lib-add { display: flex; flex-direction: column; gap: 6px; }
.lib-new { width: 100%; min-height: 84px; resize: vertical; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--sheet); color: var(--text); padding: 8px 10px; font: inherit; font-size: 13.5px; line-height: 1.55; }
.lib-new:focus { outline: none; box-shadow: var(--ring); }
.lib-add-row { display: flex; align-items: center; gap: 8px; }
.lib-from { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-tools { display: flex; align-items: center; gap: 8px; }
.lib-tools .lib-q { flex: 1; min-width: 0; }
.lib-this { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.lib-undo { align-self: flex-start; font-size: 13px; }
.lib-undo[hidden] { display: none; }
.lib-item { padding: 10px 6px 12px; border-bottom: 1px solid var(--line); }
.lib-item:last-child { border-bottom: 0; }
.lib-meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.lib-meta b { color: var(--accent-ink); }
.lib-text { white-space: pre-wrap; font-size: 14px; line-height: 1.65; max-height: 9.9em; overflow: hidden; position: relative; user-select: text; -webkit-user-select: text; }
.lib-item.open .lib-text { max-height: none; }
.lib-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.lib-acts .icon { margin-left: auto; }
.lib-empty { margin: 10px 6px; line-height: 1.6; }

/* 휴대폰 맨 위 안내·원고 목록 시트(데스크톱에선 안 보임) */
.device-note, .docs-btn, .sheet-head, .sheet-size { display: none; }

/* 샘플 원고 표시 */
.sample-tag { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent-ink); vertical-align: 1px; }
.sample-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 14px;
  border: 1px dashed var(--accent); border-radius: var(--radius); background: var(--accent-soft); color: var(--text); font-size: 14.5px; line-height: 1.55; }
.sample-note[hidden] { display: none; }
/* 원고에서 고른 구절 → 성경에서 보기 */
.ref-chip { position: fixed; z-index: 35; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--sheet); color: var(--accent-ink); font-size: 13px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.18); cursor: pointer; white-space: nowrap; }
.ref-chip[hidden] { display: none; }
.ref-chip:hover { background: var(--accent-soft); }

/* ---------- 바닥 ---------- */
.footer { padding: 18px clamp(16px, 3.5vw, 48px) 28px; color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line); }
.footer a { color: var(--muted); }

/* ---------- 프롬프트 창 ---------- */
.overlay { position: fixed; inset: 0; background: rgba(20, 16, 28, .42); display: none; z-index: 40; }
.overlay.open { display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog { background: var(--sheet); border: 1px solid var(--line); border-radius: 16px; width: min(660px, 100%); max-height: 86vh; overflow: auto; padding: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.28); }
.dialog h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -0.01em; }
.dialog .sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; line-height: 1.6; }
.dialog .sub-list { margin-top: 0; padding-left: 1.2em; }
.dialog .sub-list li + li { margin-top: 4px; }
.paste-note { margin: -4px 0 14px; padding: 9px 12px; border-left: 3px solid var(--mark); background: var(--accent-soft); border-radius: 6px; font-size: 13.5px; line-height: 1.6; color: var(--text); }
.paste-note[hidden] { display: none; }
.prompt-list { display: flex; flex-direction: column; gap: 6px; }
.prompt-item { border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; text-align: left; background: var(--sheet); transition: border-color .15s, background .15s; }
.prompt-item:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 45%, var(--sheet)); }
.prompt-item strong { display: block; font-size: 14.5px; }
.prompt-item span { display: block; font-size: 12.5px; color: var(--muted); white-space: pre-wrap; max-height: 3.2em; overflow: hidden; margin-top: 2px; }
.prompt-item .del { float: right; font-size: 12px; color: var(--muted); border: 0; background: none; }
.dialog-foot { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.custom-form { display: none; flex-direction: column; gap: 8px; margin-top: 12px; }
.custom-form.open { display: flex; }
.custom-form textarea { min-height: 90px; }
.custom-form { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.custom-form .pf { margin-bottom: 0; color: var(--text); }
.cf-guide { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.cf-sub { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 4px; }
.cf-tokens .cf-sub { display: block; margin: 0 0 6px; }
.cf-token-row { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-foot { display: flex; gap: 6px; }
#add-custom[hidden] { display: none; }
.pf { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: 13px; color: var(--muted); font-weight: 600; }
.pf input { color: var(--text); font-weight: 400; }
.manual-copy { width: 100%; min-height: 180px; border: 1px solid var(--accent); border-radius: 8px; padding: 8px; background: var(--bg); }
.open-link { margin-bottom: 10px; }

/* 처음 쓰는 사람용 사용법 안내(한 번만) */
.tour {
  position: fixed; z-index: 45; width: min(320px, calc(100vw - 16px)); background: var(--sheet); color: var(--text);
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 12px; box-shadow: 0 18px 48px rgba(0,0,0,.24);
  font-size: 14px; line-height: 1.6;
}
.tour strong { display: block; font-size: 15px; margin: 2px 0 4px; }
.tour p { margin: 0; color: var(--muted); font-size: 13.5px; }
.tour-step { font-size: 12px; color: var(--accent-ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.tour-foot { display: flex; gap: 6px; justify-content: flex-end; margin-top: 12px; }
.tour-foot [data-t="skip"] { margin-right: auto; padding-left: 0; }
.tour-target { position: relative; z-index: 44; box-shadow: 0 0 0 3px var(--accent) !important; border-radius: 8px; }
.field textarea.tour-target { background: var(--sheet); }

/* 컴퓨터 북마크 안내(한 번만). 알림(가운데 아래)과 겹치지 않게 오른쪽 아래. 휴대폰·집중·인쇄에서는 숨김 */
.bookmark-hint {
  position: fixed; right: 20px; bottom: 20px; z-index: 39;  /* 대화창(.overlay 40) 아래 */ width: min(360px, calc(100vw - 40px));
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 8px 12px 14px;
  background: var(--sheet); color: var(--text); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 12px; box-shadow: 0 14px 36px rgba(0,0,0,.18); font-size: 13.5px; line-height: 1.6;
}
.bookmark-hint p { margin: 0; flex: 1; }
.bookmark-hint .bm-icon { color: var(--mark); font-size: 16px; line-height: 1.4; }
.bookmark-hint .bm-close { flex: none; height: 26px; padding: 0 8px; margin-top: -2px; }
.bookmark-hint kbd { font: 600 12px/1 var(--font); padding: 2px 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--panel); white-space: nowrap; }
.focus .bookmark-hint { display: none; }

/* 알림 */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 8px); background: var(--text); color: var(--bg);
  padding: 11px 18px; border-radius: 12px; font-size: 14px; opacity: 0; transition: opacity .2s, transform .2s; z-index: 50; pointer-events: none;
  max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast a, .toast .linkish { color: inherit; font-weight: 700; margin-left: 6px; }

/* ---------- 휴대폰 ---------- */
@media (max-width: 760px) {
  :root { --top: 52px; }
  .bookmark-hint { display: none; }
  .topbar { gap: 8px; padding: 0 12px; }
  .brand { font-size: 15px; flex-shrink: 0; }
  .home-link, .home-sep { display: none; }  /* 좁은 화면은 앱 이름만(홈은 바닥글·사이트 링크로) */
  .top-actions { overflow-x: auto; scrollbar-width: none; flex-shrink: 1; min-width: 0; }
  .top-actions::-webkit-scrollbar { display: none; }
  .saved { display: none; }
  .view-menu { position: fixed; top: calc(var(--top) + 4px); right: 8px; left: auto; }  /* .top-actions overflow 에 잘리지 않게(qa) */
  .layout, .layout.with-bible { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-top: 1px solid var(--line); order: 2; position: static; height: auto; }  /* 휴대폰은 원고가 먼저 */
  .doc-list { max-height: 200px; }
  .ad-slot { min-height: 80px; }
  .editor { padding: 14px 12px 48px; }
  .stats { margin-left: 0; width: 100%; }
  .doc-actions .btn.danger { margin-left: 0; }
  #fields { border-radius: 12px; }
  .field { padding: 14px 14px 14px 18px; }
  .field[data-type="title"] input { font-size: 22px; }
  /* 휴대폰: 안내 문구를 다음 줄로 내려 칸 이름이 세로로 찌그러지지 않게 */
  .field-head { flex-wrap: wrap; }
  .field-head label { white-space: nowrap; }
  .field-head .hint { order: 3; width: 100%; }
  .grip { width: 36px; height: 36px; font-size: 20px; }

  /* ---- 휴대폰 단순 화면(대표 지시 2026-11-05): 핵심 기능만. 데스크톱 규칙은 건드리지 않는다 ---- */
  .device-note { display: block; padding: 8px 14px; font-size: 12.5px; line-height: 1.5; text-align: center;
    background: var(--accent-soft); color: var(--text); border-bottom: 1px solid var(--line); }
  /* 위 메뉴: 앱 이름 · 내 설교 · 성경 · 쓸 AI 만 */
  .docs-btn { display: inline-flex; }
  #profile-btn, .top-actions > .menu, #focus-btn, #open-ai, .ai-tag { display: none; }
  .top-actions { overflow: visible; gap: 6px; margin-left: auto; }
  .ai-group select { max-width: 104px; }
  /* 원고 위: 글자 수와 전체 AI 프롬프트·내보내기·삭제만 */
  #kind, #date, .stats-set, #target-note, #hist-btn, #dup { display: none; }
  /* 책 순서는 휴대폰에서도 보인다(써 보기 2026-11-05: 숨기면 휴대폰에서 쓴 꼭지를 책으로 묶을 수 없음) */
  .chapter { width: 9em; font-size: 14px; }
  .doc-meta { gap: 6px; }
  /* 칸: 이름 · 성경에서 넣기 · AI 프롬프트만(옮기기·지우기·안내 글은 컴퓨터에서) */
  .grip, .field-head .icon, .field-head .hint { display: none; }
  .field-head { flex-wrap: nowrap; }
  .field-head .tools { margin-left: auto; }
  /* 원고 목록: 위 메뉴 '내 설교'로 여는 시트. 정렬·칸 추가·여러 개 지우기는 컴퓨터에서 */
  .sidebar { display: none; }
  .docs-open .sidebar { display: flex; position: fixed; inset: 0; height: auto; z-index: 25; border-top: 0; overflow: auto; padding: 14px 14px 28px; }
  .docs-open body { overflow: hidden; }
  /* 머리(닫기)는 목록을 내려도 늘 보이게 붙여 둔다. 시트 위 여백 14px만큼 끌어올려 틈 없이 */
  .sheet-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: -14px; z-index: 2;
    margin: -14px -14px 0; padding: 12px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
  .sheet-head strong { font-size: 16px; }
  .sheet-head .btn { min-height: 40px; padding: 0 16px; font-size: 15px; }
  .share-btn { height: 38px; padding: 0 14px; font-size: 14px; }  /* 공유 단추: 휴대폰 손가락 크기 */
  /* 글자 크기: 휴대폰은 '보기 ▾'가 숨으므로 여기서 바꾼다(나이 든 목회자 페르소나) */
  .sheet-size { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
  .sheet-size span { margin-right: 4px; }
  .sheet-size .btn { min-height: 40px; font-size: 15px; }
  .sheet-size .btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--text); font-weight: 600; }
  /* 기기 안내는 맨 위에 있으니 바닥글에선 뺀다 */
  .footer-device { display: none; }
  .sidebar h2 .sel-toggle, #sort, .add-row, .sel-bar { display: none !important; }
  .doc-list { max-height: none; }
}

#print-view { display: none; }
@media print {
  #app, .toast, .overlay, .bookmark-hint { display: none !important; }
  #print-view { display: block; color: #000; font-size: 12pt; line-height: 1.7; }
  #print-view h1 { font-size: 20pt; margin: 0 0 4pt; }
  #print-view h2 { font-size: 13pt; margin: 16pt 0 4pt; }
  #print-view p { margin: 0 0 4pt; }
  #print-view .pv-meta { color: #555; margin-bottom: 14pt; }
  #print-view h1.pv-chapter { font-size: 16pt; margin: 0 0 8pt; break-before: page; }
  /* 강단용 큰 글씨 */
  #print-view.large { font-size: 17pt; line-height: 1.9; }
  #print-view.large h1 { font-size: 24pt; }
  #print-view.large h2 { font-size: 18pt; margin-top: 20pt; }
  #print-view.large p { margin-bottom: 6pt; }
}

/* 지운 원고 되돌리기(목록 아래) */
#undo-trash { display: block; margin-top: 6px; font-size: 12.5px; text-align: left; }
#undo-trash[hidden] { display: none; }

/* 여러 개 지우기 */
.sidebar h2 .sel-toggle { margin-left: auto; font-size: 12px; font-weight: 500; }
.sel-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 8px 10px; border-radius: 10px; background: var(--accent-soft); }
.sel-bar[hidden] { display: none; }
.sel-bar .linkish { font-size: 12.5px; }
.sel-bar #sel-del { margin-left: auto; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.sel-bar #sel-del:disabled { opacity: .45; cursor: default; }
.doc-list .pick { display: inline-block; width: 15px; height: 15px; margin: 0 8px -2px 0; border: 1.5px solid var(--muted); border-radius: 4px; vertical-align: baseline; }
.doc-list .pick.on { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--sheet); }
.doc-list li button.picked { background: color-mix(in srgb, var(--accent-soft) 70%, transparent); }

/* ---------- 부가 영역 줄이기(설정 extras: "compact", 대표 지시 2026-11-05) ----------
   성경·자료함을 닫으면 오른쪽 열을 접어 원고를 넓게. 문의·공유·출판 안내는 왼쪽 목록 아래 한두 줄. */
.layout.compact-extras:not(.with-bible) { grid-template-columns: 264px minmax(0, 1fr); }
.layout.compact-extras:not(.with-bible) > .rail { display: none; }
@media (max-width: 1100px) { .layout.compact-extras:not(.with-bible) { grid-template-columns: 232px minmax(0, 1fr); } }
@media (min-width: 761px) and (max-width: 900px) { .layout.compact-extras:not(.with-bible) { grid-template-columns: 220px minmax(0, 1fr); } }
@media (max-width: 760px) { .layout.compact-extras:not(.with-bible) { grid-template-columns: 1fr; } }
.focus .layout.compact-extras, .focus .layout.compact-extras.with-bible { grid-template-columns: minmax(0, 1fr); }
.extras { position: relative; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.extras[hidden] { display: none; }
/* × 는 출간 안내 카드(강조색 바탕) 오른쪽 위에 얹는다. 누르기 쉬운 28px 칸. */
.extras-close { position: absolute; top: 14px; right: 4px; z-index: 1; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: rgba(255, 255, 255, .85); font-size: 20px; line-height: 1; cursor: pointer; }
.extras-close:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.extras-close:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.extras .upsell-head { padding-right: 26px; } /* 좁은 폭에서도 × 가 머리글 글자와 겹치지 않게(qa-ops 권고) */
@media (max-width: 760px) { .extras { display: none; } } /* 휴대폰 폭에선 부가 섹션 없음(대표 2026-11-06) */
.extra-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); }
.extra-row .linkish { font-size: 12.5px; color: var(--muted); }
.extra-row .linkish:hover { color: var(--text); }
.share-pop[hidden] { display: none; }
.share-pop .share { border-top: 0; padding-top: 2px; margin: 0; }
.share-pop .share-head { display: none; }

/* ---------- 휴대폰 소개 화면(설정 phoneIntro, 대표 지시 2026-11-05: 휴대폰은 앱 대신 소개 + 공유) ---------- */
.phone-intro body { background: var(--bg); }
.intro { max-width: 560px; margin: 0 auto; padding: 28px 18px 40px; color: var(--text); }
.intro-kicker { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--accent-ink); }
.intro h1 { margin: 0 0 10px; font-size: 24px; line-height: 1.35; word-break: keep-all; }
.intro-lead { margin: 0 0 18px; font-size: 15.5px; line-height: 1.65; color: var(--text); word-break: keep-all; }
/* 위: 전체 화면 + 번호 */
.intro-hero { margin: 0 0 22px; }
.hero-frame { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-strong); box-shadow: 0 14px 34px -18px rgba(40, 30, 80, .55); }
.hero-frame img { display: block; width: 100%; height: auto; }
.hero-dot { position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 700; line-height: 28px; text-align: center; text-decoration: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .85), 0 4px 10px rgba(40, 30, 80, .4); }
.intro-hero figcaption { margin-top: 8px; font-size: 12.5px; color: var(--muted); text-align: center; }
/* 카드: 같은 사진을 확대 + 강조점 + 말풍선 */
.intro-features { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 18px; counter-reset: none; }
.feat { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); overflow: hidden; scroll-margin-top: 16px; }
.zoom { position: relative; overflow: hidden; background: #f4f2f8; border-bottom: 1px solid var(--line); }
.zoom img { position: absolute; max-width: none; height: auto; transform: scale(.9); opacity: .0; transition: transform .9s cubic-bezier(.2, .7, .2, 1), opacity .5s ease; }
.feat.in .zoom img { transform: scale(1); opacity: 1; }
.spot { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 2.5px solid var(--accent);
  background: rgba(124, 102, 196, .14); box-shadow: 0 0 0 4px rgba(255, 255, 255, .7); opacity: 0; transition: opacity .4s ease .5s; }
.feat.in .spot { opacity: 1; animation: spot-pulse 2.2s ease-out .9s infinite; }
/* 단추·메뉴를 둘러싸는 강조 테두리(box): 동그라미가 단추 글자를 가리던 문제(대표 지적 2026-11-06) */
.spot.spot-box { width: auto; height: auto; margin: 0; border-radius: 9px; background: transparent; }
@keyframes spot-pulse { 0% { box-shadow: 0 0 0 4px rgba(255, 255, 255, .7), 0 0 0 0 rgba(124, 102, 196, .55); } 70% { box-shadow: 0 0 0 4px rgba(255, 255, 255, .7), 0 0 0 16px rgba(124, 102, 196, 0); } 100% { box-shadow: 0 0 0 4px rgba(255, 255, 255, .7), 0 0 0 0 rgba(124, 102, 196, 0); } }
.tip { position: absolute; left: var(--ax); max-width: 78%; padding: 8px 12px; border-radius: 10px; background: #1f1a2e; color: #fff;
  font-size: 13px; font-weight: 600; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transform: translate(calc(-1 * var(--ax)), 6px); opacity: 0; transition: opacity .4s ease .7s, transform .4s ease .7s; box-shadow: 0 8px 22px -8px rgba(20, 14, 40, .6); }
.tip::after { content: ""; position: absolute; left: var(--ax); width: 10px; height: 10px; margin-left: -5px; background: inherit; transform: rotate(45deg); }
.tip-top { bottom: calc(100% - var(--hy) + 24px); }
.tip-top::after { bottom: -4px; }
.tip-bottom { top: calc(var(--hy) + 24px); }
.tip-bottom::after { top: -4px; }
.feat.in .tip { opacity: 1; transform: translate(calc(-1 * var(--ax)), 0); }
.feat-text { display: flex; gap: 12px; padding: 14px 16px 16px; }
.feat-n { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 700; line-height: 24px; text-align: center; margin-top: 1px; }
.feat-text strong { display: block; margin-bottom: 4px; font-size: 15.5px; }
.feat-text div > span { display: block; font-size: 14px; line-height: 1.6; color: var(--muted); word-break: keep-all; }
@media (prefers-reduced-motion: reduce) { .zoom img, .spot, .tip { opacity: 1 !important; transform: none !important; animation: none !important; } .tip { transform: translate(calc(-1 * var(--ax)), 0) !important; } }
.intro-pc, .intro-mine { margin: 0 0 18px; padding: 14px; border-radius: 10px; background: var(--accent-soft); }
.intro-pc h2 { margin: 0 0 6px; font-size: 16px; }
.intro-pc p, .intro-mine p { margin: 0; font-size: 14.5px; line-height: 1.65; word-break: keep-all; }
.intro-addr { margin: 8px 0 !important; font-size: 18px !important; font-weight: 700; color: var(--accent-ink); }
.intro-mine .btn { margin-top: 10px; }
.intro .share { margin: 4px 0 18px; }
.intro .share-btn { height: 38px; font-size: 14px; }
.intro-foot { font-size: 12px; line-height: 1.6; color: var(--muted); }
.intro-app { margin: 0 0 14px; font-size: 13.5px; text-align: center; color: var(--muted); }
.intro-app a { display: inline-block; padding: 8px 4px; color: var(--accent-ink); font-weight: 600; }
.intro-app span { font-size: 12px; }
