@font-face {
  font-family: 'Hope Sans';
  src: url('fonts/PretendardVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Hope Display';
  src: url('fonts/CormorantGaramond.ttf') format('truetype');
  font-weight: 300 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --canvas: #fcf9f4;
  --paper: #fffefb;
  --soft: #f0f5ee;
  --pine: #1e3528;
  --ink: #263029;
  --muted: #58685e;
  --accent-color: #3a7757;
  --season-color: #3a7757;
  --line: #d5e0d4;
  --warm: #f2e9dc;
  --qt-font-size: 18px;
  --serif: 'Gowun Batang', 'Noto Serif KR', Batang, Georgia, serif;
  --sans: 'Hope Sans', 'Noto Sans KR', 'Malgun Gothic', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 16px/1.76 var(--sans); }
a { color: var(--pine); text-underline-offset: .23em; }
button, select, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { word-break: keep-all; }
#hope-qt { width: min(100% - 80px, 1160px); margin-inline: auto; }
.skip-link { position: fixed; z-index: 2; inset: 12px auto auto 12px; padding: 8px 14px; background: var(--paper); transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.preview-banner { padding: 7px 16px; background: var(--warm); color: var(--pine); text-align: center; font-size: 13px; font-weight: 650; }
.masthead {
  min-height: 77px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-symbol {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--accent-color);
  font: 550 22px/1 'Hope Display', Georgia, serif;
  letter-spacing: -.025em;
}
.brand-copy { margin: 0; color: var(--pine); font-size: 17px; font-weight: 700; line-height: 1.3; }
.brand-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 500; }
.masthead nav { display: flex; align-items: center; gap: clamp(13px, 3vw, 34px); }
.masthead nav a { display: inline-flex; align-items: center; min-height: 42px; text-decoration: none; font-size: 14px; font-weight: 550; white-space: nowrap; }
.masthead nav a:hover { text-decoration: underline; }
.church-home { padding-left: 23px; border-left: 1px solid var(--line); }

.eyebrow { margin-bottom: 10px; color: var(--accent-color); font-size: 12px; letter-spacing: .07em; font-weight: 670; }
.reading-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(238px, .35fr); gap: clamp(22px, 4vw, 54px); margin-block: clamp(23px, 4vw, 48px) 56px; }
.reading-space { min-width: 0; }
.section-top { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.section-top h2 { margin: 0; color: var(--pine); font: 650 clamp(25px, 3.3vw, 35px)/1.25 var(--serif); letter-spacing: -.05em; }
.section-note { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.font-controls { display: flex; align-items: center; gap: 6px; }
.font-controls > span { margin-right: 5px; color: var(--muted); font-size: 12px; }
.font-controls button { min-width: 44px; min-height: 44px; padding: 5px; border: 1px solid var(--line); border-radius: 2px; background: var(--paper); color: var(--pine); font-size: 13px; }
.font-controls button:hover { border-color: var(--accent-color); }
.datebar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; padding: 13px 17px; background: var(--soft); border: 1px solid var(--line); }
.today-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}
.today-link[aria-current=date] { background: #1e3528; border-color: #1e3528; color: #fffefb; }
.month-control, .day-control { display: flex; align-items: center; gap: 8px; min-width: 0; }
.month-control label, .day-control label { color: var(--muted); font-size: 12px; white-space: nowrap; }
.datebar select, #qt-date { border: 1px solid var(--line); border-radius: 2px; background: var(--paper); color: var(--ink); min-height: 44px; padding: 3px 9px; font-size: 14px; }
.badge { display: inline-block; margin-left: auto; padding: 4px 11px; border: 1px solid var(--line); background: var(--paper); color: var(--pine); border-radius: 2px; font-size: 12px; white-space: nowrap; }
.badge:empty { display: none; }
.calendar-list { display: flex; gap: 4px; overflow-x: auto; padding: 9px 13px; border: 1px solid var(--line); border-top: 0; background: var(--paper); scrollbar-width: thin; }
.calendar-list:empty { display: none; }
.calendar-day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 43px; min-height: 55px; text-decoration: none; border: 1px solid transparent; border-radius: 2px; color: var(--muted); font-size: 11px; }
.calendar-day b { font: 550 23px/1 'Hope Display', Georgia, serif; font-variant-numeric: lining-nums; color: var(--pine); }
.calendar-day[aria-current=date] { background: #1e3528; color: #e3ebde; }
.calendar-day[aria-current=date] b { color: #fffefb; }
.calendar-day:hover { border-color: var(--accent-color); }
#status { white-space: pre-line; margin: 17px 0 0; padding: 21px 24px; background: var(--paper); color: var(--muted); border: 1px solid var(--line); font-size: 15px; }
#status:empty { display: none; }
#status > strong { color: var(--pine); }
#status p { margin: 4px 0 0; }
#status a { display: inline-block; margin-top: 9px; font-size: 14px; font-weight: 620; }
#daily-reading { margin: 21px 0 0; background: var(--paper); border: 1px solid var(--line); font-size: var(--qt-font-size); }
.reading-header { min-height: 235px; display: flex; flex-direction: column; justify-content: center; padding: clamp(22px, 5vw, 52px); background: linear-gradient(90deg, #f4eee1 0%, #f4eee1ed 33%, #f4eee1a0 62%, #f4eee115 100%), #f4eee1 url('assets/advent-landscape.webp') right 75% / cover no-repeat; border-bottom: 1px solid #ddd6c7; }
.reading-header #display-date { color: #446050; margin-bottom: 7px; letter-spacing: .028em; }
.reading-header h3 { max-width: 14em; color: #24382c; margin-bottom: 10px; font: 670 clamp(27px, 3.5vw, 43px)/1.26 var(--serif); letter-spacing: -.035em; overflow-wrap: anywhere; }
#passage-ref { margin: 0; color: #3d584a; font-weight: 650; font-size: 15px; }
#qt-comment-jump { align-self: flex-start; margin-top: 7px; color: #244232; font-size: 14px; font-weight: 650; }
.reading-text { max-width: 75ch; margin-inline: auto; padding: 24px clamp(18px, 5.2vw, 64px) 36px; }
.scripture { font-family: var(--serif); line-height: 2; }
.scripture h3 { margin: 23px 0 13px; color: var(--accent-color); font: 650 .82em var(--sans); }
.verse { margin-bottom: .8em; overflow-wrap: anywhere; }
.verse sup { margin-right: .68em; color: var(--accent-color); font: 660 .64em var(--sans); }
.missing-text { color: var(--muted); font-size: .85em; }
.meditation { margin: 37px 0 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.meditation h3, .application h3, .daily-prayer h3 { color: var(--pine); margin-bottom: 10px; font-size: .93em; }
.meditation p, .daily-prayer p { margin-bottom: 0; white-space: pre-line; line-height: 1.9; }
.application, .daily-prayer { padding: 20px clamp(16px, 3vw, 28px); border-radius: 2px; }
.application { background: var(--soft); }
.application ol { padding-left: 1.4em; margin-bottom: 0; }
.application li + li { margin-top: .62em; }
.daily-prayer { border: 1px solid var(--line); margin-top: 15px; }
#attend { width: 100%; margin-top: 19px; min-height: 46px; border: 1px solid var(--accent-color); background: var(--paper); color: var(--pine); border-radius: 2px; }
.participation { display: grid; grid-template-columns: 1fr 2fr; gap: 12px 25px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.participation span, .participation small, .reading-progress label { color: var(--muted); font-size: 12px; }
.participation strong { display: block; font-size: 22px; color: var(--pine); }
.participation strong span { font-size: inherit; }
progress { display: block; margin: 5px 0; width: 100%; height: 7px; accent-color: var(--accent-color); }

#books-section { min-width: 0; padding-top: 1px; }
#books-heading { font-size: clamp(22px, 2.5vw, 28px); }
.book-shelf { display: grid; gap: 0; border-top: 1px solid var(--line); }
.book-empty { grid-column: 1 / -1; margin: 0; padding: 24px; background: var(--soft); border: 1px solid var(--line); color: var(--muted); }
.book-tile { display: grid; grid-template-columns: 68px minmax(0, 1fr); align-items: center; gap: 14px; min-height: 120px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.book-cover { display: grid; place-items: center; aspect-ratio: 148 / 210; background: var(--soft); color: var(--pine); text-align: center; font: 600 12px/1.4 var(--serif); }
.book-cover img { display: block; width: 100%; height: 100%; object-fit: contain; }
.book-month { margin-bottom: 5px; color: var(--accent-color); font-size: 12px; font-weight: 650; }
.book-details h3 { margin: 0 0 2px; color: var(--pine); font: 680 clamp(15px, 1.6vw, 19px)/1.42 var(--serif); }
.book-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 12px; }
.book-actions a { min-height: 38px; display: inline-flex; align-items: center; color: var(--pine); font-size: 13px; font-weight: 600; white-space: nowrap; }

#community { max-width: 900px; margin: 0 auto 32px; padding-top: 25px; border-top: 1px solid var(--line); }
#qt-discussion { margin-top: 34px; padding-top: 20px; border-top: 1px solid var(--line); }
#qt-discussion-status { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
#qt-discussion-status:empty { display: none; }
#qt-discussion form p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.qt-discussion-connect { display: flex; gap: 8px; align-items: end; }
.qt-discussion-connect input { flex: 1; min-width: 0; }
.qt-discussion-connect button, .qt-discussion-actions button { min-height: 44px; padding: 7px 13px; border: 0; border-radius: 2px; background: #1e3528; color: #fffefb; white-space: nowrap; }
.qt-discussion-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
#qt-discussion form .qt-discussion-agreement { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; color: var(--muted); font-weight: 450; line-height: 1.5; }
.qt-discussion-agreement input { width: 17px; height: 17px; min-height: 0; flex: none; margin: 2px 0 0; accent-color: var(--accent-color); }
.qt-discussion-remove { color: var(--muted); background: transparent; border: 1px solid var(--line); padding: 6px 9px; min-height: 36px; }
#community .section-heading h2 { color: var(--pine); }
#mode-label, #feed-status { color: var(--muted); font-size: 13px; }
form { padding: 19px; background: var(--paper); border: 1px solid var(--line); }
form label { display: block; font-size: 13px; font-weight: 600; }
form label span { color: var(--muted); font-weight: 400; }
.identity-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
form input, textarea { width: 100%; display: block; min-height: 44px; margin-top: 4px; padding: 9px; background: var(--canvas); border: 1px solid var(--line); border-radius: 2px; color: var(--ink); }
textarea { min-height: 110px; resize: vertical; }
.form-bottom { display: flex; align-items: center; justify-content: space-between; gap: 11px; margin-top: 12px; }
.form-bottom button { padding: 8px 14px; min-height: 44px; border: 0; border-radius: 2px; background: #1e3528; color: #fffefb; white-space: nowrap; }
.share-card { padding: 16px 0; border-bottom: 1px solid var(--line); }
.share-card header { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.share-card header span, .share-card time { font-size: 12px; color: var(--muted); }
.share-card time { margin-left: auto; }
.share-card p { white-space: pre-wrap; overflow-wrap: anywhere; }
.pray-button { min-height: 42px; padding: 7px 10px; color: var(--pine); background: var(--paper); border: 1px solid var(--line); border-radius: 2px; }
.pray-button[aria-pressed=true] { border-color: var(--accent-color); background: var(--soft); }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; padding: 19px 0 42px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer a { font-size: 13px; font-weight: 650; color: var(--pine); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  #hope-qt { width: calc(100% - 48px); }
  .reading-layout { grid-template-columns: minmax(0, 1fr); }
  .book-shelf { grid-template-columns: repeat(auto-fit, minmax(min(100%, 255px), 1fr)); column-gap: 24px; }
}
@media (max-width: 600px) {
  #hope-qt { width: calc(100% - 30px); }
  .masthead { min-height: 0; flex-wrap: wrap; gap: 5px 13px; padding: 12px 0 6px; }
  .brand-symbol { width: 36px; height: 36px; font-size: 18px; }
  .brand-copy { font-size: 14px; }
  .brand-copy small { font-size: 10px; }
  .masthead nav { gap: 15px; }
  .masthead nav a { min-height: 40px; font-size: 12px; }
  .masthead .church-home { padding-left: 0; border-left: 0; }
  .reading-layout { margin-top: 19px; gap: 32px; }
  .reading-tools { margin-bottom: 10px; }
  #daily-reading { margin-top: 13px; }
  .reading-header { min-height: 173px; background-size: auto, cover; background-position: center, right 65%; }
  .reading-text { padding-top: 12px; }
  .font-controls > span { display: none; }
  .datebar { gap: 7px; padding: 9px; }
  .today-link { padding: 0 10px; font-size: 13px; }
  .month-control { flex: 1 1 96px; }
  .month-control select { width: 100%; }
  .datebar select, #qt-date { padding: 3px 5px; font-size: 13px; }
  #qt-date { max-width: 127px; }
  .month-control label, .day-control label { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  .badge { margin-left: 0; }
  #status { padding: 16px; }
  .book-tile { min-height: 120px; }
  .book-actions a { min-height: 44px; }
  .site-footer > span:last-child { display: none; }
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --canvas: #222321;
    --paper: #2d2e2a;
    --soft: #353630;
    --pine: #f3f0e7;
    --ink: #f3f0e7;
    --muted: #d0cbbb;
    --accent-color: #b3cbbb;
    --line: #5a5b51;
    --warm: #3e392f;
  }
}
