/* ts-popups.css — 가운데 뜨는 팝업(모달): 로그인/회원가입 · 소개/약관 · 성경(번역본) 추가.
   Keep 뷰어 대화상자(.six-dialog-head/.six-close) 모양을 따르되 PC·모바일 모두 가운데 카드로 띄운다. */
.ts-popup {
  width: min(440px, calc(100vw - 32px));
  max-height: min(86dvh, 760px);
  padding: 0; border: 1px solid var(--ts-line); border-radius: 18px;
  background: var(--ts-surface); color: var(--ts-ink);
  box-shadow: 0 24px 60px rgba(15, 40, 80, .22);
  overflow: hidden;
}
.ts-popup[open] { display: flex; flex-direction: column; animation: ts-pop .16s ease-out; }
.ts-popup::backdrop { background: rgba(10, 25, 45, .38); }
.ts-popup-head {
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--ts-line-soft);
}
.ts-popup-head h2 { margin: 0; font: 800 17px var(--ksans); color: var(--ts-ink-strong); }
.ts-edition-headcopy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ts-popup-close {
  min-height: 38px; padding: 7px 12px; border: 1px solid var(--ts-line); border-radius: 10px;
  background: var(--ts-surface); color: var(--ts-ink); font: 500 13px var(--ksans); cursor: pointer;
}
.ts-popup-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 18px; overflow-y: auto; min-height: 0; }
.ts-popup-body p, .ts-popup-body h3 { margin: 0; }
.ts-info { width: min(640px, calc(100vw - 32px)); }
.ts-info .ts-popup-body { font-size: 13.5px; line-height: 1.8; gap: 12px; }
.ts-info h3 { font-size: 14px; margin-top: 8px; color: var(--ts-ink-strong); }
.ts-sample-flag { padding: 8px 10px; border-radius: 8px; background: var(--ts-warn-soft); color: var(--ts-warn-ink); font-size: 12px; }
.ts-oauth {
  display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px; border: 1px solid var(--ts-line); border-radius: 11px;
  background: var(--ts-surface); color: var(--ts-ink); font: 700 14px var(--ksans); cursor: pointer;
}
.ts-oauth span { font-weight: 500; color: var(--ts-sub); }
.ts-oauth:hover { background: var(--ts-hover); border-color: var(--ts-accent-2); }
.ts-or { display: flex; align-items: center; gap: 10px; color: var(--ts-sub); font-size: 12px; }
.ts-or::before, .ts-or::after { content: ""; flex: 1; border-top: 1px solid var(--ts-line); }
.ts-field {
  min-height: 44px; padding: 0 12px; border: 1px solid var(--ts-line); border-radius: 10px;
  background: var(--ts-surface); color: var(--ts-ink); font: 14px var(--ksans);
}
.ts-field:focus-visible, .ts-oauth:focus-visible, .ts-auth-btn:focus-visible { outline: 2px solid var(--ts-accent); outline-offset: 1px; }
.ts-auth-actions { display: flex; gap: 8px; margin-top: 4px; }
.ts-auth-btn {
  flex: 1; min-height: 44px; border: 1px solid var(--ts-line); border-radius: 11px;
  background: var(--ts-surface); color: var(--ts-ink); font: 700 14px var(--ksans); cursor: pointer;
}
.ts-auth-primary { background: var(--ts-accent); border-color: var(--ts-accent); color: #fff; }
.ts-auth-btn[href] { display:flex; align-items:center; justify-content:center; text-decoration:none; }
.ts-auth-btn[href] { padding:10px 12px; }
#tsPasswordResetLinkPreview[hidden] { display:none !important; }
.ts-password-forgot { align-self:flex-start; padding:4px 0; border:0; background:transparent; color:var(--ts-accent-ink); font:600 13px var(--ksans); text-decoration:underline; cursor:pointer; }
.ts-popup-note { font-size: 11.5px; color: var(--ts-sub); line-height: 1.6; }
.ts-edition-count { font-size: 12px; color: var(--ts-accent-ink); }
#tsEditions .ts-edition-list { gap: 8px; }
#tsEditions .ts-edition-option { padding: 10px 8px; min-height: 64px; }
#tsEditions .ts-edition-label strong { font-size: 14px; }
#tsEditions .ts-edition-label small { font-size: 12px; }
#tsEditions .ts-edition-move { flex-direction: row; gap: 4px; }
#tsEditions .ts-edition-move button { width: 34px; height: 34px; font-size: 16px; border-radius: 8px; }
.ts-drag-handle { flex: 0 0 18px; color: var(--ts-sub); font-size: 18px; cursor: grab; touch-action: none; user-select: none; text-align: center; }
[data-six-dragging="true"] { outline: 2px solid var(--ts-accent); outline-offset: -2px; opacity: .75; }
@keyframes ts-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ts-popup[open] { animation: none; } }
@media (max-width: 767px) {
  #tsEditions .ts-popup-head { gap: 4px; padding: 12px 10px; }
  #tsEditions .ts-edition-headcopy { flex: 1 1 auto; flex-direction: row; align-items: baseline; gap: 6px; white-space: nowrap; }
  #tsEditions .ts-popup-head h2 { flex: 0 0 auto; font-size: 12px; }
  #tsEditions #sixOrderHelp { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
  #tsEditions .ts-popup-close { flex: 0 0 28px; width: 28px; min-height: 28px; padding: 0; overflow: hidden; font-size: 0; }
  #tsEditions .ts-popup-close::after { content: "×"; font-size: 19px; }
}

/* Keep 뷰어 대화상자(화면 언어 선택 #sixUiLanguage, 성경·장·절 이동 #sixJump)는 Keep CSS가 모바일(≤767)에서만
   꾸며 PC에서는 브라우저 기본 모양으로 떴다(사람 지적 2026-09-28 "화면 언어 색 이상해"). 위 팝업과 같은 카드로 맞춘다.
   ID+클래스 선택자로 Keep 모바일 규칙보다 우선. 이동 창은 모바일에서 Keep처럼 아래에서 올라오는 시트를 유지한다. */
#sixUiLanguage.ts-dialog, #sixJump.ts-dialog, #sixChapterPicker.ts-dialog {
  width: min(440px, calc(100vw - 32px)); max-height: min(86dvh, 760px);
  margin: auto; inset: 0; padding: 0;
  border: 1px solid var(--ts-line); border-radius: 18px;
  background: var(--ts-surface); color: var(--ts-ink);
  box-shadow: 0 24px 60px rgba(15, 40, 80, .22); overflow: hidden;
}
#sixUiLanguage.ts-dialog[open], #sixJump.ts-dialog[open], #sixChapterPicker.ts-dialog[open] { display: flex; flex-direction: column; animation: ts-pop .16s ease-out; }
#sixUiLanguage.ts-dialog::backdrop, #sixJump.ts-dialog::backdrop, #sixChapterPicker.ts-dialog::backdrop { background: rgba(10, 25, 45, .38); }
.ts-dialog .six-dialog-head {
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--ts-line-soft);
}
.ts-dialog .six-dialog-head h2 { margin: 0; font: 800 17px var(--ksans); color: var(--ts-ink-strong); }
.ts-dialog .six-close {
  min-height: 38px; padding: 7px 12px; border: 1px solid var(--ts-line); border-radius: 10px;
  background: var(--ts-surface); color: var(--ts-ink); font: 500 13px var(--ksans); cursor: pointer;
}
.ts-dialog .six-close:hover { background: var(--ts-hover); }
#sixUiLanguage.ts-dialog #sixUiHelp { flex-shrink: 0; margin: 14px 20px 6px; font-size: 12.5px; line-height: 1.7; color: var(--ts-sub); }
#sixUiLanguage.ts-dialog #sixUiOptions { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 0; padding: 8px 20px 20px; }
#sixUiLanguage .six-ui-option {
  position: relative; display: flex; align-items: center; gap: 10px; margin: 0;
  min-height: 50px; padding: 12px 44px 12px 14px;
  border: 1px solid var(--ts-line); border-radius: 12px; background: var(--ts-surface); cursor: pointer;
}
#sixUiLanguage .six-ui-option:hover { background: var(--ts-hover); }
#sixUiLanguage .six-ui-option input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
#sixUiLanguage .six-ui-option > span { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font: 600 14px var(--ksans); color: var(--ts-ink); }
#sixUiLanguage .six-ui-option small { margin: 0; font-size: 11px; font-weight: 600; color: var(--ts-accent-ink); }
#sixUiLanguage .six-ui-option small:not(:empty) { padding: 2px 8px; border-radius: 999px; background: var(--ts-accent-soft); border: 1px solid var(--ts-line); }
#sixUiLanguage .six-ui-option:has(input:checked) { background: var(--ts-accent-soft); border-color: var(--ts-accent); box-shadow: inset 3px 0 var(--ts-accent); }
#sixUiLanguage .six-ui-option:has(input:checked)::after {
  content: "✓"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font: 800 16px var(--ksans); color: var(--ts-accent);
}
#sixUiLanguage .six-ui-option:has(input:focus-visible) { outline: 2px solid var(--ts-accent); outline-offset: 2px; }
/* 이동 창 안쪽 */
#sixJump.ts-dialog .six-jump-body { overflow-y: auto; padding: 16px 20px 20px; min-height: 0; }
#sixJump.ts-dialog .six-jump-fields { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
#sixJump.ts-dialog .six-jump-fields label { display: block; min-width: 0; font-size: 11.5px; color: var(--ts-sub); }
#sixJump.ts-dialog .six-jump-fields select {
  display: block; width: 100%; height: 44px; margin-top: 6px; padding: 0 8px;
  border: 1px solid var(--ts-line); border-radius: 10px; background: var(--ts-surface); color: var(--ts-ink); font: 13px var(--ksans);
}
#sixJump.ts-dialog #sixJumpSummary { margin: 12px 0; font-size: 12px; line-height: 1.7; color: var(--ts-sub); }
#sixJump.ts-dialog #sixJumpGo { width: 100%; min-height: 46px; border: 0; border-radius: 11px; background: var(--ts-accent); color: #fff; font: 700 14px var(--ksans); cursor: pointer; }
#sixJump.ts-dialog #sixJumpChapters { margin: 16px 0 4px; }
@media (max-width: 767px) {
  #sixJump.ts-dialog, #sixChapterPicker.ts-dialog { inset: auto 0 0 0; margin: 0; width: 100%; max-height: min(86dvh, 780px); border-radius: 22px 22px 0 0; border-bottom: 0; }
  #sixJump.ts-dialog[open], #sixChapterPicker.ts-dialog[open] { animation: six-up .2s ease-out; }
}
@media (prefers-reduced-motion: reduce) { #sixUiLanguage.ts-dialog[open], #sixJump.ts-dialog[open], #sixChapterPicker.ts-dialog[open] { animation: none; } }
.six-chapter-picker-count { margin: 3px 0 0; color: var(--ts-sub); font-size: 12px; }
.six-chapter-picker-grid { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 20px 20px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.six-chapter-picker-grid button { height: 36px; min-height: 36px; font-size: 14px; }
.six-mobile-picker { display: flex; flex: 0 0 auto; flex-direction: column; max-height: min(44dvh, 360px); border-bottom: 1px solid var(--ts-line); background: var(--ts-surface); box-shadow: 0 8px 18px rgba(25, 20, 12, .1); animation: six-picker-down .16s ease-out; }
.six-mobile-picker[hidden] { display: none; }
.six-mobile-picker-head { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--ts-line-soft); }
.six-mobile-picker-head h2 { margin: 0; font: 750 15px var(--ksans); color: var(--ts-ink-strong); }
.six-picker-close { flex: 0 0 34px; width: 34px; height: 34px; padding: 0; border: 1px solid var(--ts-line); border-radius: 9px; background: var(--ts-surface); color: var(--ts-ink); font: 500 23px/1 var(--ksans); cursor: pointer; }
.six-picker-close:hover { background: var(--ts-hover); }
.six-mobile-picker .six-chapter-picker-grid { max-height: none; padding: 10px 14px 12px; gap: 5px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.six-mobile-picker .six-chapter-picker-grid button, .six-mobile-picker .six-verse-picker-grid button { height: 34px; min-height: 34px; font-size: 13px; border-radius: 8px; }
.six-verse-picker-grid { flex: 0 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 10px 12px 12px; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.six-header-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.six-question-trigger { font: 750 23px/1 var(--ksans); }
.six-question-trigger:disabled { opacity: .35; cursor: default; }
.six-question-trigger.is-ready { animation: six-question-ready 1.8s ease-in-out infinite; border-color: var(--ts-accent-2); color: var(--ts-accent-ink); }
@keyframes six-question-ready { 50% { background: var(--ts-hover); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ts-accent-2) 22%, transparent); } }
.six-question-selected { outline: 2px solid var(--ts-accent-2); outline-offset: -2px; border-radius: 4px; }
::highlight(six-question-word) { background: var(--ts-hover); text-decoration: underline; text-decoration-color: var(--ts-accent-2); }
#sixDesktopSearch { position: absolute; top: var(--ts-bar); right: 0; left: 0; padding: 16px 20px; background: var(--ts-surface); border-bottom: 1px solid var(--ts-line); box-shadow: 0 8px 20px rgba(0,0,0,.1); animation: six-picker-down .16s ease-out; }
#sixDesktopSearch[hidden] { display: none; }
.six-search-tools { margin-bottom: 14px; }
.six-search-tools .searchrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-bottom: 8px; }
.six-search-tools .searchrow input { min-width: 0; height: 44px; background: var(--ts-surface); color: var(--ts-ink); border-color: var(--ts-line); font-size: 14px; }
.six-search-title { margin: 0 0 12px; color: var(--ts-ink-strong); font: 750 17px var(--ksans); }
.six-search-tools .six-search-hint { display: block; margin: 0 0 12px; color: var(--ts-ink-2); font: 400 12px/1.6 var(--ksans); }
.six-search-advanced { padding-top: 10px; border-top: 1px solid var(--ts-line); }
.six-search-advanced > summary { cursor: pointer; color: var(--ts-accent-ink); font: 650 13px var(--ksans); }
.six-search-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.six-search-fields label { display: grid; gap: 6px; color: var(--ts-ink-strong); font: 650 12px var(--ksans); }
.six-search-fields :is(input, select) { box-sizing: border-box; min-width: 0; width: 100%; height: 40px; padding: 8px 10px; border: 1px solid var(--ts-line); border-radius: 8px; background: var(--ts-surface); color: var(--ts-ink); font: 400 13px var(--ksans); }
.six-search-fields :is(input, select):focus-visible { outline: 2px solid var(--ts-accent-2); outline-offset: 2px; }
.six-search-options { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; font: 400 12px var(--ksans); }
.six-search-options label { display: flex; align-items: center; gap: 6px; color: var(--ts-ink); }
.six-search-options input { accent-color: var(--ts-accent-2); }
.six-search-options button, .six-search-more { padding: 7px 12px; border: 1px solid var(--ts-line); border-radius: 8px; background: var(--ts-surface); color: var(--ts-accent-ink); font: 650 12px var(--ksans); cursor: pointer; }
.six-search-help { margin: 12px 0 0; color: var(--ts-ink-2); font: 400 12px/1.7 var(--ksans); }
.six-search-result { display: grid !important; gap: 5px; width: 100%; margin-top: 7px; padding: 10px 12px; border: 1px solid var(--ts-line); border-radius: 8px; background: var(--ts-surface); color: var(--ts-ink); text-align: left; font: 400 13px/1.6 var(--ksans); cursor: pointer; }
.six-search-result strong { color: var(--ts-accent-ink); font-size: 12px; }
.six-search-result span { overflow-wrap: anywhere; }
.six-search-result:hover { background: var(--ts-hover); }
.six-search-tools .genesis-search-results { max-height: 45dvh; overflow-y: auto; }
.six-search-more { width: 100%; margin-top: 10px; }
@media (max-width: 767px) { .six-search-advanced, .six-search-title { display: none; } .six-search-tools { margin-bottom: 10px; } }
.ts-topbar-tools > [data-c="hidenote"] { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--ts-line); border-radius: 9px; background: var(--ts-surface); color: var(--ts-ink); font: 750 23px/1 var(--ksans); cursor: pointer; }
.ts-topbar-tools > [data-c="hidenote"].on { border-color: var(--ts-accent-2); background: var(--ts-hover); color: var(--ts-accent-ink); }
@media (min-width: 768px) { #sixDesktopSettings .right-btns { flex-wrap: wrap; } #sixDesktopSettings .highlight-control { margin-left: 0; } .six-question-trigger { display: none; } }
@media (max-width: 767px) {
  body[data-six-screen="read"]:not(.ts-intro-open):not(.ts-public-view) #sixMenuTrigger { display: none; }
  body[data-six-screen="select"] #sixHomeTrigger, body[data-six-screen="select"] #sixCopyTrigger, body[data-six-screen="select"] #sixQuestionTrigger { display: none; }
  .six-header { gap: 5px; }
  .six-header h1 { min-width: 0; font-size: clamp(15px, 4.3vw, 23px); }
  .six-header .six-icon { min-width: 34px; width: 34px; height: 36px; }
}
@media (prefers-reduced-motion: reduce) { .six-question-trigger.is-ready { animation: none; } }
.six-copy-trigger svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.six-copy-trigger.is-active { color: var(--ts-accent-ink); border-color: var(--ts-accent-2); background: var(--ts-hover); }
.six-copy-mode .six-header { z-index: 80; }
.six-copy-prompt { position: fixed; z-index: 79; top: calc(var(--six-mobile-header-height, 64px) + env(safe-area-inset-top, 0px)); left: 0; right: 0; padding: 9px 14px; border-bottom: 1px solid var(--ts-line); background: var(--ts-hover); color: var(--ts-ink-strong); text-align: center; font: 650 13px/1.4 var(--ksans); box-shadow: 0 3px 10px rgba(0,0,0,.08); }
.six-copy-prompt[hidden] { display: none; }
.six-copy-prompt { position: static; margin-bottom: 8px; border-radius: 8px; }
.six-question-input[hidden], .six-question-label[hidden], #sixVerseQuestionSubmit[hidden] { display: none; }
#sixVerseQuestionStatus.is-success { padding: 12px; border: 1px solid var(--ts-accent-2); border-radius: 9px; background: var(--ts-hover); color: var(--ts-ink-strong); font-weight: 650; line-height: 1.65; }
.verse.six-copy-selected { position: relative; z-index: 1; border-radius: 9px; background: color-mix(in srgb, var(--ts-accent-2) 22%, var(--ts-surface)); box-shadow: inset 0 0 0 2px var(--ts-accent-2); }
.six-note-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; margin-top: 10px; }
.six-note-full-trigger, .six-note-question { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; margin: 0; padding: 4px 14px; border: 1px solid var(--ts-line); border-radius: 8px; background: var(--ts-surface); color: var(--ts-accent-ink); font: 700 13px var(--ksans); cursor: pointer; }
.six-note-full-trigger:hover, .six-note-question:hover { background: var(--ts-hover); }
.six-question-trigger svg { width: 24px; height: 24px; }
.six-note-full-trigger[hidden] { display: none; }
.six-note-full[hidden], .six-word-detail[hidden] { display: none !important; }
.six-word-detail { margin-top: 2px; padding: 11px 12px; border: 1px dashed var(--ts-line); border-radius: 8px; background: var(--ts-surface); color: var(--ts-ink-2); line-height: 1.65; }
.six-word-detail strong { color: var(--ts-ink-strong); }
.six-word-detail p { margin: 5px 0 0; }
.verse-num { cursor: pointer; }
.ts-chat-history-messages { display: grid; gap: 10px; max-height: min(60dvh, 540px); overflow: auto; margin: 8px 0 0; padding: 0; list-style: none; }
.ts-chat-history-message { padding: 12px; border: 1px solid var(--ts-line); border-radius: 10px; background: var(--ts-surface); }
.ts-chat-history-message[data-role="assistant"] { background: var(--ts-hover); }
.ts-chat-history-message strong { font: 700 13px var(--ksans); color: var(--ts-accent-ink); }
.ts-chat-history-message p { margin: 5px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.ts-chat-history-message small { display: block; margin-top: 7px; color: var(--ts-sub); }
.ts-chat-dialog { width: min(720px, calc(100vw - 28px)); }
.ts-chat-dialog .ts-popup-body { display: grid; gap: 12px; }
.ts-chat-live-messages { display: grid; gap: 10px; max-height: min(48dvh, 440px); overflow: auto; margin: 0; padding: 0; list-style: none; }
.ts-chat-live-message { padding: 12px; border: 1px solid var(--ts-line); border-radius: 10px; background: var(--ts-surface); }
.ts-chat-live-message[data-role="assistant"] { background: var(--ts-hover); }
.ts-chat-live-message strong { font: 700 13px var(--ksans); color: var(--ts-accent-ink); }
.ts-chat-live-message p { margin: 5px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.ts-chat-live-message small { display: block; margin-top: 7px; color: var(--ts-sub); }
.ts-chat-compose { display: grid; gap: 8px; }
.ts-chat-compose label { font-weight: 700; }
.ts-chat-compose textarea { width: 100%; min-height: 82px; resize: vertical; padding: 10px 12px; border: 1px solid var(--ts-line); border-radius: 9px; background: var(--ts-surface); color: var(--ts-ink); font: 15px/1.6 var(--ksans); }
.ts-chat-compose-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ts-sub); font-size: 13px; }
.ts-chat-compose button:disabled { opacity: .55; cursor: not-allowed; }
.six-question-label { display: block; margin: 8px 0 4px; font-weight: 700; color: var(--ts-ink); }
.six-question-input { width: 100%; min-height: 120px; resize: vertical; font: 15px/1.6 var(--ksans); }
body.dark-mode .verse.six-copy-selected { background: color-mix(in srgb, var(--ts-accent-2) 30%, var(--ts-surface)); }
.six-header h1 { display: flex; align-items: center; justify-content: center; gap: 7px; flex: 1 1 auto; min-width: 0; }
.six-header .six-brand-home { min-width: 0; max-width: calc(100vw - 185px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; }
.six-picker-inline-count { flex: 0 0 auto; margin-left: 14px; color: var(--ts-sub); font: 500 12px var(--ksans); white-space: nowrap; }
.six-picker-inline-count[hidden] { display: none; }
.six-testament-ribbon { display: none; }
.six-verse-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 56px; min-height: 38px; padding: 0 9px; border: 1px solid var(--ts-line); border-radius: 10px; background: var(--ts-surface); color: var(--ts-ink); font: 700 13px var(--ksans); cursor: pointer; }
.six-verse-trigger[aria-expanded="true"] { background: var(--ts-hover); border-color: var(--ts-accent-2); }
.six-picker-caret { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
body[data-six-screen="select"] .six-verse-trigger { display: none; }
@keyframes six-picker-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .six-mobile-picker { animation: none; } }

/* 로그인 팝업: 소셜 로그인은 준비 중(흐리게·클릭 불가), 이메일만 활성(사람 지시 2026-09-28) */
.ts-oauth.ts-pending, .ts-oauth:disabled { opacity: .5; cursor: not-allowed; background: var(--ts-hover); }
.ts-oauth:disabled:hover { border-color: var(--ts-line); }
.ts-auth-message { min-height: 1em; font-size: 12px; color: var(--ts-accent-ink); }
.ts-auth-message.is-error { color: #c0392b; }
body.dark-mode .ts-auth-message.is-error { color: #ff8a80; }
#tsChatTitle { display: flex; align-items: center; }

/* CHAT 준비 중 팝업의 문의 메일 링크 */
.ts-contact a { color: var(--ts-accent-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }

/* 계정 팝업(로그인 상태의 "로그아웃 / 회원탈퇴", 사람 지시 2026-09-30 — TASK-029, TASK-032 앱 이식). 위험 색은 탈퇴에만 쓴다. */
body { --ts-danger: #c0392b; --ts-danger-soft: #fdecea; --ts-danger-ink: #8e1f16; }
body.dark-mode { --ts-danger: #e5645a; --ts-danger-soft: #3b1d1b; --ts-danger-ink: #ffb4ab; }
.ts-manage [data-step] { display: flex; flex-direction: column; gap: 12px; }
.ts-manage [data-step][hidden] { display: none; }
.ts-manage [data-step] > p { margin: 0; font-size: 13.5px; line-height: 1.7; }
.ts-manage-choices { display: flex; gap: 8px; }
.ts-manage-choices .ts-auth-btn { flex: 1; }
.ts-danger-outline { border-color: var(--ts-danger); color: var(--ts-danger); }
.ts-danger-outline:hover { background: var(--ts-danger-soft); }
.ts-danger { background: var(--ts-danger); border-color: var(--ts-danger); color: #fff; }
.ts-danger:disabled { background: var(--ts-hover); border-color: var(--ts-line); color: var(--ts-sub); cursor: not-allowed; }
.ts-danger-box { padding: 12px 14px; border: 1px solid var(--ts-danger); border-radius: 12px; background: var(--ts-danger-soft); color: var(--ts-danger-ink); font-size: 13px; line-height: 1.65; }
.ts-danger-box strong { display: block; margin-bottom: 6px; font: 800 14px var(--ksans); }
.ts-danger-box ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.ts-manage-check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.6; color: var(--ts-ink); cursor: pointer; }
.ts-manage-check input { flex-shrink: 0; width: 17px; height: 17px; margin-top: 2px; accent-color: var(--ts-danger); }
.ts-manage-type { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; line-height: 1.6; color: var(--ts-ink-2); }
.ts-danger-outline:focus-visible, .ts-danger:focus-visible, .ts-manage-check input:focus-visible { outline: 2px solid var(--ts-danger); outline-offset: 2px; }
.ts-account-btn.is-signed-in { background: var(--ts-surface); color: var(--ts-ink-2); }

/* Mobile chapter/verse pickers drop from the header and focus the reading choice. */
@media (max-width: 767px) {
  .app { position: relative; }
  .six-picker-backdrop[hidden] { display: none; }
  .six-picker-backdrop:not([hidden]) { position: fixed; inset: 0; z-index: 58; display: block; background: rgba(25, 29, 34, .34); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
  .six-header { position: relative; z-index: 61; }
  .six-mobile-picker { position: absolute; z-index: 70; top: var(--six-mobile-header-height, 64px); left: 0; right: 0; max-height: min(44dvh, 360px); border-top: 0; overflow: hidden; }
  .six-mobile-picker .six-chapter-picker-grid { overflow-y: auto; }
  .six-verse-picker-grid { overflow-y: auto; }
  body.preview-parchment .six-header .ts-header-badge { display: none; }
  .six-header h1 { justify-content: flex-start; gap: 4px; }
  .six-header .six-brand-home { max-width: calc(100vw - 205px); font-family: var(--ksans); font-size: 17px; letter-spacing: 0; }
  body.six-chapter-picker-open .six-verse-trigger { display: none; }
  body[data-six-screen="read"] .six-header .six-brand-home { max-width: min(58vw, 250px); }
  .six-verse-trigger { position: relative; display: inline-flex; flex: 0 0 auto; min-width: 0; width: auto; min-height: 36px; padding: 0 5px; border: 0; border-radius: 8px; background: transparent; color: var(--ts-ink-2); font: 600 14px var(--ksans); white-space: nowrap; }
  .six-verse-trigger[aria-expanded="true"] { width: 42px; height: 42px; min-height: 42px; padding: 0; border: 1px solid var(--ts-line); background: var(--ts-surface); color: var(--ts-ink); }
  .six-picker-caret { margin-left: 1px; }
  .six-verse-close { display: none; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .six-verse-trigger[aria-expanded="true"] #sixCurrentVerse,
  .six-verse-trigger[aria-expanded="true"] .six-picker-caret { display: none; }
  .six-verse-trigger[aria-expanded="true"] .six-verse-close { display: block; }
  body[data-six-screen="select"] .six-verse-trigger { display: none; }
}
.ts-nav-wordmark { text-decoration: none; cursor: pointer; }
.ts-nav-wordmark:hover { color: var(--ts-accent-ink); }

@media (max-width: 767px) {
  .six-header h1 { position: absolute; left: 50%; width: max-content; max-width: calc(100vw - 235px); flex: 0 1 auto; justify-content: center; gap: 0; transform: translateX(-50%); }
  .six-header .ts-header-badge { display: block; width: 24px; height: 24px; margin-right: 6px; }
  body[data-six-screen="read"] .six-header .ts-header-badge { display: none; }
  body.preview-parchment[data-six-screen="select"] .six-header h1 { max-width: calc(100vw - 120px); }
  body.preview-parchment[data-six-screen="select"] .six-header .ts-header-badge { display: block; width: 28px; height: 28px; object-fit: contain; }
  .six-header .six-brand-home,
  .six-header .six-verse-trigger,
  .six-header .six-picker-inline-count { font: 600 20px/1.25 var(--ksans); letter-spacing: 0; color: var(--ts-ink-strong); }
  .six-header .six-brand-home { max-width: min(62vw, 290px); padding: 4px 0; }
  .six-verse-trigger,
  .six-verse-trigger[aria-expanded="true"] { min-width: 0; width: auto; min-height: 0; height: auto; margin-left: 8px; padding: 4px 0; border: 0; border-radius: 0; background: transparent; color: var(--ts-ink-strong); }
  .six-verse-trigger[aria-expanded="true"] { background: transparent; }
  .six-picker-caret, .six-verse-close { display: none !important; }
  #sixSettingsTrigger .six-close-icon { display: none; }
  body.six-mobile-picker-open #sixSettingsTrigger .six-gear-icon { display: none !important; }
  body.six-mobile-picker-open #sixSettingsTrigger .six-close-icon { display: block !important; }
}

@media (max-width: 767px) {
  body[data-six-screen="read"] .app > .six-header { transition: transform .18s ease, opacity .18s ease, margin-bottom .18s ease; }
  body[data-six-screen="read"].six-header-hidden .app > .six-header {
    transform: translateY(-105%); opacity: 0; pointer-events: none;
    margin-bottom: calc(-1 * var(--six-mobile-header-height, var(--six-header-height, 64px)));
  }
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  body[data-six-screen="read"] .app > .six-header { transition: none; }
}
@media (max-width: 767px) {
  .six-header .six-verse-trigger[aria-expanded="true"] #sixCurrentVerse { display: inline !important; }
}
.ts-field[hidden] { display: none !important; }

/* Keep the verse-wide explanation action beside the question action. */
.six-note-actions { justify-content: flex-start; flex-wrap: wrap; }
#sixVerseQuestion.ts-popup { max-height: min(54dvh, 460px); }
#sixVerseQuestion .ts-popup-head { padding: 10px 14px; }
#sixVerseQuestion .ts-popup-close { flex: 0 0 36px; width: 36px; min-height: 36px; padding: 0; font-size: 22px; line-height: 1; }
#sixVerseQuestion .ts-popup-body { gap: 7px; padding: 10px 14px 12px; }
#sixVerseQuestion .six-question-input { min-height: 88px; max-height: 24dvh; }
.six-question-auth-hint { display: grid; gap: 6px; padding: 9px 10px; border: 1px solid var(--ts-line); border-radius: 10px; background: var(--ts-hover); }
.six-question-auth-hint p { margin: 0; color: var(--ts-sub); font-size: 12px; line-height: 1.45; }
.six-question-auth-hint .ts-auth-btn { min-height: 34px; }
#sixQuestionAuthHint[hidden] { display: none !important; }
.six-question-register { display:grid; gap:7px; }
.six-question-register[hidden] { display:none !important; }
@media (max-width: 767px) {
  #sixVerseQuestion.ts-popup { width: calc(100vw - 24px); max-height: min(46dvh, 380px); border-radius: 14px; }
  #sixVerseQuestion .ts-popup-head { padding: 8px 11px; }
  #sixVerseQuestion .ts-popup-head h2 { font-size: 15px; }
  #sixVerseQuestion .ts-popup-close { flex-basis: 32px; width: 32px; min-height: 32px; padding: 0; font-size: 21px; }
  #sixVerseQuestion .ts-popup-body { gap: 6px; padding: 8px 11px 10px; }
  #sixVerseQuestion .ts-popup-note { font-size: 10px; line-height: 1.35; }
  #sixVerseQuestion .six-question-label { margin: 2px 0 0; font-size: 12px; }
  #sixVerseQuestion .six-question-input { min-height: 64px; max-height: 16dvh; padding: 8px 10px; font-size: 13px; }
  #sixVerseQuestion .six-question-register { gap:5px; }
  #sixVerseQuestion .six-question-register .ts-field { min-height:38px; }
  #sixVerseQuestion .six-question-register .ts-auth-actions { gap:6px; }
  #sixVerseQuestion .six-question-register .ts-auth-btn { min-height:36px; padding:4px 7px; font-size:12px; }
  #sixVerseQuestion .ts-auth-actions { margin-top: 0; }
  #sixVerseQuestion .ts-auth-btn { min-height: 36px; font-size: 13px; }
}
