/* 큐티 page v2 (owner-approved board docs/boards/qt-v2.png, 2026-11-22: "슬롭 같은 디자인 … 미니멀하게"). A book page:
   no timeline dots, no coloured side bars, no English tags, no boxed controls. The passage flows as text; the six steps
   are chapters; the index tracks reading. Spacing uses the site scale (8/16/24/40/64), one family, one amber for numbers. */
.qtp { --qt-size: 18px; }
.qtp .qtp-head { padding-top: var(--s2); border-top: 1px solid var(--ink); }
.qtp-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; min-height: 44px; }
.qtp-day { display: flex; align-items: center; gap: 4px; margin-left: -12px; } /* scale-exception: optical or section offset -12px */
.qtp-nav { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--night);
  transition: background-color var(--spring-quick-dur) var(--spring-quick), color var(--spring-quick-dur) var(--spring-quick); }
.qtp-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.qtp-nav:hover, .qtp-nav:focus-visible { background: rgba(11,36,71,.06); }
.qtp-nav:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.qtp-nav[data-off] { color: var(--rule); pointer-events: none; }
.qtp-date { margin: 0; min-width: 9em; text-align: center; font: 600 17px/1.5 var(--sans); color: var(--night); }
.qtp-reading { margin: 0; font: 500 15px/1.5 var(--sans); color: var(--ink-2); }
.qtp-reading b { margin-left: 8px; font-weight: 600; color: var(--night); }
.qtp-title { margin: var(--s3) 0 0; font: 600 56px/1.2 var(--sans) !important; letter-spacing: -.03em; color: var(--night); text-wrap: balance; }
.qtp-ref { min-height: 1.5em; margin: var(--s1) 0 0; font: 600 17px/1.5 var(--sans); color: #9C5200; }

.qtp-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; margin-top: var(--s5); }
.qtp-text { grid-column: 1 / span 8; min-width: 0; }
.qtp-index { grid-column: 10 / -1; position: sticky; top: calc(var(--header-h, 72px) + 24px); }

/* text size: two quiet words, no boxes */
.qtp-size { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin: 0 0 var(--s2); }
.qtp-size button { min-width: 44px; min-height: 44px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--ink-2);
  font: 500 15px/1.4 var(--sans); cursor: pointer; transition: background-color var(--spring-quick-dur) var(--spring-quick), color var(--spring-quick-dur) var(--spring-quick); }
.qtp-size button[data-size="1"] { font-size: 17px; font-weight: 600; color: var(--night); }
.qtp-size button:hover:not([disabled]), .qtp-size button:focus-visible { background: rgba(11,36,71,.06); color: var(--night); }
.qtp-size button[disabled] { color: var(--ink-3); cursor: default; }
.qtp-size button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.qtp-size i { width: 1px; height: 16px; background: var(--rule); }

/* the passage reads as text */
.qtp-flow { max-width: 34em; margin: 0; font: 400 var(--qt-size)/1.85 var(--sans); color: var(--ink); word-break: keep-all; text-wrap: pretty; }
.qtp-flow .vn { position: relative; top: -.6em; margin-right: .25em; font-size: .62em; font-weight: 600; color: #9C5200; vertical-align: baseline; line-height: 1.4; }

/* the day's point: one rule, a small heading, larger words */
.qtp-point { margin: var(--s5) 0 0; padding-top: var(--s3); border-top: 1px solid var(--night); }
.qtp-point h2 { margin: 0 0 var(--s2); font: 600 15px/1.5 var(--sans); letter-spacing: .02em; color: var(--ink-2); }
.qtp-point p { margin: 0; max-width: 36em; font: 500 21px/1.75 var(--sans); letter-spacing: -.01em; color: var(--night); word-break: keep-all; text-wrap: pretty; }

/* six steps as chapters */
.qtp-chapters { margin-top: var(--s5); }
.qtp-ch { padding: var(--s3) 0 var(--s4); border-top: 1px solid var(--rule); scroll-margin-top: calc(var(--header-h, 64px) + 24px); }
.qtp-ch h2 { display: flex; align-items: baseline; gap: var(--s2); margin: 0 0 var(--s2); font: 600 21px/1.4 var(--sans); letter-spacing: -.01em; color: var(--night); }
.qtp-ch h2 .num { font: 600 15px/1.4 var(--sans); letter-spacing: .04em; color: #9C5200; }
.qtp-body { max-width: calc(34em + 40px); padding-left: 32px; font: 400 var(--qt-size)/1.85 var(--sans); color: var(--ink); word-break: keep-all; }
.qtp-body p { margin: 0; }
.qtp-body p + p { margin-top: var(--s1); }
.qtp-qs { margin: 0; padding-left: 1.4em; }
.qtp-qs li { padding-left: 4px; }
.qtp-qs li + li { margin-top: var(--s1); }
.qtp-qs li::marker { font-weight: 600; color: #9C5200; }
.qtp-hint { min-height: 56px; padding-bottom: var(--s1); border-bottom: 1px solid var(--rule); color: var(--ink-3) !important; font-size: 17px; }
.qtp-ch.is-target { animation: qtp-mark 2.4s cubic-bezier(.2,.7,.2,1); }
@keyframes qtp-mark { 0%, 40% { background: rgba(214,230,238,.8); box-shadow: 0 0 0 16px rgba(214,230,238,.8); } 100% { background: transparent; box-shadow: 0 0 0 16px transparent; } }

/* the day's 새벽기도회: a plain text link */
.qtp-dawn { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; margin-top: var(--s4); color: var(--night); text-decoration: none; }
.qtp-dawn svg { width: 18px; height: 18px; fill: currentColor; flex: none; transition: transform var(--spring-smooth-dur) var(--spring-smooth); }
.qtp-dawn span { display: flex; flex-direction: column; }
.qtp-dawn b { font: 600 17px/1.5 var(--sans);
  background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-position: 0 100%; background-size: 0 1px;
  transition: background-size var(--spring-smooth-dur) var(--spring-smooth); }
.qtp-dawn small { font: 400 15px/1.5 var(--sans); color: var(--ink-2); }
.qtp-dawn:hover b, .qtp-dawn:focus-visible b { background-size: 100% 1px; }
.qtp-dawn:hover svg, .qtp-dawn:focus-visible svg { transform: scale(1.2); }
.qtp-dawn:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; border-radius: 2px; } /* scale-exception: focus ring corner */
.qtp .hm-player { margin-top: var(--s4); }

/* the six-step index */
.qtp-index-h { margin: 0 0 var(--s2); padding-bottom: var(--s2); border-bottom: 1px solid var(--night); font: 600 21px/1.4 var(--sans); color: var(--night); }
.qtp-index ol { margin: 0; padding: 0; list-style: none; }
.qtp-index a { position: relative; display: flex; align-items: baseline; gap: var(--s2); min-height: 44px; padding: 8px 0 8px var(--s2);
  color: var(--ink-2); text-decoration: none; transition: color var(--spring-quick-dur) var(--spring-quick); }
.qtp-index a::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px; border-radius: 1px; background: var(--night);
  transform: scaleY(0); transition: transform var(--spring-snappy-dur) var(--spring-snappy); }
.qtp-index a .num { font: 600 13px/1.4 var(--sans); letter-spacing: .04em; }
.qtp-index a b { font: 500 17px/1.5 var(--sans); }
.qtp-index a:hover, .qtp-index a:focus-visible { color: var(--night); }
.qtp-index a[aria-current] { color: var(--night); }
.qtp-index a[aria-current] b { font-weight: 600; }
.qtp-index a[aria-current]::before { transform: scaleY(1); }
.qtp-index a:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* loading: placeholder lines hold the shape; failed: one honest line with the church's own board */
.qtp-skel { display: none; }
.qtp[data-state="loading"] .qtp-skel { display: grid; gap: 16px; padding-top: 8px; }
.qtp-skel i { display: block; height: 14px; border-radius: 8px; background: #E7E4DC; animation: qtp-breathe 1.6s ease-in-out infinite; }
.qtp-skel i:nth-child(3n) { width: 82%; } .qtp-skel i:nth-child(3n+2) { width: 94%; } .qtp-skel i:last-child { width: 46%; }
@keyframes qtp-breathe { 50% { opacity: .5; } }
.qtp[data-state="loading"] .qtp-title { color: var(--ink-3); }
.qtp-fallback { display: none; margin: var(--s4) 0 0; font: 400 17px/1.7 var(--sans); color: var(--ink-2); }
.qtp[data-state="failed"] .qtp-fallback { display: block; }
.qtp[data-state="failed"] .qtp-grid { display: none; }
.qtp[data-state="ready"] .qtp-flow, .qtp[data-state="ready"] .qtp-point, .qtp[data-state="ready"] .qtp-chapters { animation: qtp-in .5s cubic-bezier(.2,.7,.2,1) both; }
@keyframes qtp-in { from { opacity: 0; } }

@media (max-width: 1100px) {
  /* the index becomes a row of six chips that stays under the header */
  .qtp-grid { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 0; }
  .qtp-text { width: 100%; }
  .qtp-index { position: sticky; top: var(--header-h, 72px); z-index: var(--z-sticky-index); width: auto; margin: 0 calc(-1 * var(--margin)) var(--s3); padding: 8px var(--margin);
    background: rgba(247,246,242,.97); box-shadow: inset 0 -1px 0 var(--rule); transition: transform var(--spring-snappy-dur) var(--spring-snappy); }
  body.chrome-hide .qtp-index { transform: translateY(calc(-1 * var(--header-h, 72px))); }
  .qtp-index-h { display: none; }
  .qtp-index ol { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
  .qtp-index a { justify-content: center; padding: 0; border-radius: 8px; background: rgba(11,36,71,.05); align-items: center; }
  .qtp-index a::before { display: none; }
  .qtp-index a b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .qtp-index a .num { font-size: 15px; }
  .qtp-index a[aria-current] { background: var(--night); color: #fff; }
  .qtp-ch { scroll-margin-top: calc(var(--header-h, 64px) + 64px); }
}
@media (max-width: 760px) {
  .qtp-title { font-size: 36px !important; margin-top: var(--s2); }
  .qtp-ref { font-size: 15px; }
  .qtp-grid { margin-top: var(--s4); }
  .qtp-reading { width: 100%; font-size: 13px; }
  .qtp-point p { font-size: 18px; }
  .qtp-ch h2 { font-size: 18px; }
  .qtp-body { padding-left: 0; }
  .qtp-index { top: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .qtp-skel i, .qtp-ch.is-target, .qtp[data-state="ready"] .qtp-flow, .qtp[data-state="ready"] .qtp-point, .qtp[data-state="ready"] .qtp-chapters { animation: none; }
  .qtp-ch.is-target { background: rgba(214,230,238,.8); }
  .qtp-index a::before, .qtp-dawn svg, .qtp-dawn b { transition: none; }
}

/* hidden means hidden: the display rules above must not show these before they have content */
.qtp-dawn[hidden], .qtp-point[hidden], .qtp-reading[hidden] { display: none !important; }

/* the page keeps its loaded height while it waits, so nothing below jumps when the text arrives */
.qtp[data-state="loading"] .qtp-text { min-height: 150vh; }
@media (max-width: 760px) { .qtp-reading[hidden] { display: block !important; visibility: hidden; min-height: 1.5em; } }

/* chapter text follows the reader's text size (a global p size would otherwise hold it at 17px) */
.qtp-body p:not(.qtp-hint), .qtp-body li { font-size: inherit; }

/* focus on the passage (owner, 2026-11-22: "본문에 집중 … 너무 밑에가 보이니까 집중이 안되는 느낌"): the six-step index is hidden
   while the passage and point are read, and fades in when the steps begin. Rows are exact: 44px each, a fixed number
   column, names on one left edge. Without the script (or while loading) the index simply stays shown. */
.qtp-index { transition: opacity var(--spring-smooth-dur) var(--spring-smooth), visibility 0s linear .35s; }
.qtp[data-state="ready"]:not(.show-index) .qtp-index { opacity: 0; visibility: hidden; }
.qtp.show-index .qtp-index { opacity: 1; visibility: visible; transition: opacity var(--spring-smooth-dur) var(--spring-smooth), visibility 0s; }
.qtp-index a { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 0; height: 44px; min-height: 44px; padding: 0 0 0 var(--s2); }
.qtp-index a .num { font-variant-numeric: tabular-nums; }
.qtp-index a::before { top: 12px; bottom: 12px; }
@media (max-width: 1100px) { .qtp-index a { display: flex; justify-content: center; padding: 0; } }
@media (prefers-reduced-motion: reduce) { .qtp-index { transition: none; } }

/* reading focus, continuous (owner, 2026-11-23: "부드럽지 않다 … 애플 모션처럼"): no scroll snapping; each part's brightness is
   set from its distance to the middle of the screen on every frame, so it brightens and recedes as smoothly as the scroll */
.qtp .qtp-part { opacity: var(--lit, 1); scroll-margin: calc(var(--header-h, 64px) + 24px) 0 96px; will-change: opacity; } /* scale-exception: optical or section offset 96px */
/* every part, the last step too, can reach the middle of the screen: room below the final step */
.qtp-text { padding-bottom: 40vh; }
@media (max-width: 760px) { .qtp-text { padding-bottom: 30vh; } }

/* writing (owner, 2026-11-23): quiet lined fields in the reading column; they grow as the reader writes */
.qtp-write { display: block; margin-top: var(--s2); }
.qtp-write textarea { display: block; width: 100%; min-height: 64px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0;
  background: transparent; color: var(--ink); font: 400 var(--qt-size)/1.8 var(--sans); resize: none; overflow: hidden;
  transition: border-color var(--spring-quick-dur) var(--spring-quick), background-color var(--spring-quick-dur) var(--spring-quick); }
.qtp-write textarea::placeholder { color: var(--ink-3); }
.qtp-write textarea:hover { border-bottom-color: rgba(11, 36, 71, .35); }
.qtp-write textarea:focus { outline: none; box-shadow: 0 2px 0 var(--night); border-bottom-color: var(--night); background: rgba(214, 230, 238, .25); }
.qtp-write textarea:focus-visible { box-shadow: 0 2px 0 var(--orange); }
.qtp-hint { display: none; }
.qtp-done { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--rule); }
.qtp-pdf { min-height: 48px; padding: 0 24px; border: 0; border-radius: 20px; background: var(--night); color: #fff; font: 600 17px/1.4 var(--sans); cursor: pointer;
  box-shadow: 0 0 0 0 rgba(11, 36, 71, .14); transition: box-shadow var(--spring-smooth-dur) var(--spring-smooth), transform 90ms ease-out; }
.qtp-pdf:hover, .qtp-pdf:focus-visible { box-shadow: 0 0 0 6px rgba(11, 36, 71, .14); }
.qtp-pdf:active { transform: scale(.97); }
.qtp-pdf:focus-visible, .qtp-clear:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }
.qtp-clear { min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--ink-2); font: 500 15px/1.4 var(--sans); cursor: pointer; border-radius: 8px; }
.qtp-clear:hover { background: rgba(11, 36, 71, .06); color: var(--ink); }
.qtp-saved { margin: 0 0 0 auto; font: 400 13px/1.4 var(--sans); color: var(--ink-2); }
@media (max-width: 760px) { .qtp-saved { width: 100%; margin: 0; } }

/* the PDF: a clean A4 page of the day's QT and the reader's writing, no site chrome */
@media print {
  @page { size: A4; margin: 18mm 16mm; }
  html, body { background: #fff !important; }
  .header, .footer, .tabbar, .sheet, .subnav, .page-head, .qtp-index, .qtp-size, .qtp-done, .qtp-nav, .qtp-dawn, .hm-player, .skip, body::before { display: none !important; }
  .qtp-grid { display: block !important; margin: 0 !important; }
  .qtp-part, .qtp .qtp-part { opacity: 1 !important; }
  .qtp-title { font-size: 26pt !important; color: #000 !important; }
  .qtp-flow, .qtp-body, .qtp-write textarea { font-size: 11pt !important; line-height: 1.7 !important; color: #000 !important; }
  .qtp-ch { break-inside: avoid; padding: 10pt 0 !important; }
  .qtp-text { padding-bottom: 0 !important; }
  .qtp-write textarea { border-bottom: 1px solid #bbb !important; background: none !important; height: auto !important; min-height: 0; overflow: visible; }
  .qtp-write textarea:placeholder-shown { min-height: 40pt; }
  .qtp-write textarea::placeholder { color: transparent; }
}
@media print {
  .qtp .qtp-flow, .qtp .qtp-point, .qtp .qtp-chapters, .qtp .qtp-part { animation: none !important; opacity: 1 !important; }
  html, html body, html body main, html body .sec { background: #fff !important; background-color: #fff !important; }
}
/* an answer line under every question */
.qtp-qs li { margin-bottom: var(--s2); }
.qtp-q { display: block; }
.qtp-write.qtp-a { margin-top: 4px; }
.qtp-write.qtp-a textarea { min-height: 40px; padding: 8px 0; font-size: calc(var(--qt-size) - 2px); color: var(--night); }
@media print { .qtp-write.qtp-a textarea:placeholder-shown { min-height: 28pt; } }

/* printed answers: plain text that grows downward and breaks across pages (no scroll box in the PDF) */
.qtp-print-a { display: none; }
@media print {
  .qtp-write textarea { display: none !important; }
  .qtp-print-a { display: block; min-height: 28pt; padding: 4pt 0 6pt; border-bottom: 1px solid #bbb;
    white-space: pre-wrap; overflow-wrap: anywhere; font: 400 11pt/1.7 var(--sans); color: #000; }
}
/* the current step's number reads white on its navy chip (it was grey, 2.9:1) */
@media (max-width: 760px) { .qtp-index a[aria-current] .num, .qtp-index a[aria-current] { color: #fff !important; } }
/* phones: the six chips are one quiet row ABOVE the passage, not a list beside it, so they stay shown (hidden they left
   an empty band between the title and the text) */
@media (max-width: 1100px) { .qtp[data-state="ready"]:not(.show-index) .qtp-index { opacity: 1; visibility: visible; } }
/* print: a heading never ends a page alone, and a question stays with the start of its answer */
@media print {
  .qtp h1, .qtp h2, .qtp h3, .qtp-ch h2, .qtp-q, .qtp-point h3 { break-after: avoid; page-break-after: avoid; }
  .qtp-qs li { break-inside: avoid-page; }
  .qtp-qs li:has(.qtp-print-a:not(:empty)) { break-inside: auto; }
}
/* the two day chevrons sit at opposite ends of the date row, the date between them (phones) */
@media (max-width: 760px) {
  .qtp-day { flex: 1 1 100%; justify-content: space-between; margin-inline: -12px; } /* scale-exception: optical offset aligns the 44px hit area's chevron to the margin */
  .qtp-date { flex: 1; }
}
/* 가– | 가+ ends on the passage's right edge, not in the empty middle of the page */
.qtp-size { max-width: 646px; }   /* fixed at the default passage edge: it never moves when the reader changes the size (owner, 2026-11-23) */

/* the step tabs on phones and tablets (owner 2026-11-25 "숫자로 하면 아예 이해 못한다"): every tab says its step, the number a
   small prefix; tabs keep their natural width and slide sideways; the step being read is filled navy and kept in view */
@media (max-width: 1100px) {
  .qtp-index ol li { flex: 0 0 auto !important; }
  .qtp-index a { gap: 6px !important; padding: 0 14px !important; white-space: nowrap; }
  .qtp-index a b { position: static !important; width: auto !important; height: auto !important; overflow: visible !important; clip-path: none !important;
    font: 500 15px/1 var(--sans) !important; }
  .qtp-index a .num { font: 600 13px/1 var(--sans) !important; color: #4A5670; } /* full ink: 60% faded numbers were 2.6:1 (audit 2026-11-25) */
  .qtp-index .qtp-ix-passage b { display: none; }
  .qtp-index .qtp-ix-passage .num { font-size: 15px !important; opacity: 1; }
  .qtp-index a[aria-current] { background: var(--night) !important; color: #fff !important; }
  .qtp-index a[aria-current] .num { color: #fff !important; opacity: .8; }
  .qtp-index ol { scroll-padding-inline: 16px; }
}
@media (max-width: 1100px) { .qtp-index ol li { flex: 1 0 auto !important; } .qtp-index a { justify-content: center !important; } }
