:root { --reading-scale: 1; --qt-toolbar-height: 142px; --reader-top: 112px; }
body { height: 100vh; height: 100dvh; overflow: hidden; line-height: 1.6; }
.reader-header { position: fixed; top: 0; inset-inline: 0; height: 62px; z-index: 101; display: flex; justify-content: space-between; align-items: center; padding: 0 max(24px, calc((100vw - 960px) / 2)); background: var(--bg); border-bottom: 1px solid var(--border); }
.reader-header time { font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.reader-header .brand-link { font-size: 15px; }
.reader-header .brand-mark { width: 28px; height: 28px; }
.slider-container { width: 100%; height: 100%; overflow: hidden; }
.cards-wrapper { display: flex; height: 100%; transition: transform 320ms var(--ease-out); }
.cards-wrapper.is-restoring, .cards-wrapper.is-dragging { transition: none; }
.card-slide { flex: 0 0 100%; min-width: 0; height: 100%; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; align-items: center; padding: calc(var(--reader-top) + 28px) 28px calc(var(--qt-toolbar-height) + 36px); scrollbar-width: thin; scrollbar-color: #b4b6a2 var(--bg); }
.card { flex-shrink: 0; width: 100%; max-width: 720px; background: var(--paper); border: 1px solid var(--border); border-radius: 12px; padding: 42px 48px; box-shadow: 0 5px 24px #5e563507; }
.card-kicker { font-size: 11px; color: var(--muted); letter-spacing: .12em; margin-bottom: 14px; }
.header-card { background: #faf7ed; padding: 42px 48px 30px; }
.hero-date { font-size: 12px; color: #65715e; letter-spacing: .015em; }
h1 { margin: 24px 0 20px; max-width: 540px; font-family: var(--serif); font-weight: 500; font-size: clamp(30px,4vw,42px); line-height: 1.55; letter-spacing: -.055em; word-break: keep-all; overflow-wrap: anywhere; }
.hero-subtitle { font-size: 13px; color: var(--muted); line-height: 1.9; word-break: keep-all; }
.hero-rule { height: 1px; width: 40px; background: #adb29d; margin: 30px 0 24px; }
.hero-invitation { font-family: var(--serif); font-size: 18px; line-height: 1.9; color: #505c48; word-break: keep-all; }
.intro-actions { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.start-reading { min-width: 175px; }
.like-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 9px 13px; background: transparent; border: 1px solid var(--border); border-radius: 7px; color: #8c5949; font-size: 13px; }
.like-btn.liked { background: #eee0d6; border-color: #b68470; }
.heart-icon { font-size: 17px; }
.footer-message { display: flex; align-items: center; gap: 14px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); }
.logo-container img { width: 44px; height: 44px; object-fit: contain; opacity: .75; cursor: pointer; }
.footer-message p { color: var(--muted); font-size: 11px; line-height: 1.9; word-break: keep-all; }
h2 { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 28px; padding-bottom: 22px; border-bottom: 1px solid var(--border); font-family: var(--serif); font-weight: 500; font-size: 26px; letter-spacing: -.04em; }
.verse { display: flex; align-items: baseline; gap: 16px; margin-bottom: 21px; }
.verse-num { flex: 0 0 22px; font-size: 12px; font-weight: 600; color: #667550; }
.verse-text { min-width: 0; font-family: var(--serif); font-size: calc(1.1rem * var(--reading-scale)); line-height: 2.1; text-align: left; word-break: keep-all; overflow-wrap: anywhere; }
.analysis-content, .qt-value { font-size: calc(1rem * var(--reading-scale)); line-height: 1.95; white-space: pre-line; text-align: left; word-break: keep-all; overflow-wrap: anywhere; color: #464a40; }
.analysis-item { margin-bottom: 26px; padding-bottom: 26px; border-bottom: 1px solid var(--border); }
.analysis-item:last-child { margin: 0; padding: 0; border: 0; }
.analysis-range { display: inline-block; background: var(--sage); color: #4d603f; padding: 4px 10px; font-size: 12px; border-radius: 4px; margin-bottom: 14px; }
.qt-item { margin-bottom: 30px; }
.qt-item:last-child { margin-bottom: 0; }
.qt-label { display: block; font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: 12px; }
.qt-value { border-left: 2px solid #b4bea2; padding: 15px 18px; background: #f1f2e9; border-radius: 0 7px 7px 0; }
.nav-button { position: fixed; top: 45%; z-index: 100; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 50%; background: var(--paper); color: var(--accent); font-size: 25px; }
.nav-button:hover { background: var(--sage); }
.nav-button.prev { left: max(18px, calc((100vw - 870px)/2)); }
.nav-button.next { right: max(18px, calc((100vw - 870px)/2)); }
.nav-button.hidden { visibility: hidden; pointer-events: none; }
.indicators { position: fixed; top: 62px; inset-inline: 0; z-index: 101; height: 50px; display: flex; justify-content: center; padding: 0 16px; gap: 16px; background: var(--bg); border-bottom: 1px solid var(--border); }
.indicator { position: relative; min-width: 68px; min-height: 44px; padding: 0 16px; border: 0; background: transparent; color: var(--muted); font-size: 13px; }
.indicator::after { content: ''; position: absolute; bottom: 0; left: 16px; right: 16px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); transform: scaleX(0); opacity: 0; transition: transform var(--motion-medium) var(--ease-out), opacity var(--motion-fast); }
.indicator.active { color: var(--accent); font-weight: 650; }
.indicator.active::after { transform: scaleX(1); opacity: 1; }
.ig-action-bar { position: fixed; bottom: 0; inset-inline: 0; z-index: 102; padding: 8px max(18px, calc((100vw - 672px) / 2)) calc(9px + env(safe-area-inset-bottom, 0px)); background: #faf8f1; border-top: 1px solid var(--border); box-shadow: 0 -4px 20px #51493606; }
.action-summary { display: flex; align-items: center; gap: 6px; min-height: 35px; margin-bottom: 5px; }
.action-btn { min-width: 40px; min-height: 35px; border: 0; background: transparent; color: #8c5949; border-radius: 5px; }
.action-btn.liked { background: #eee0d6; }
.like-count { color: var(--muted); font-size: 11px; }
.like-count strong { color: var(--text); }
.feed-return { margin-left: auto; font-size: 12px; padding: 8px 0 8px 16px; text-decoration: none; }
.personal-tools { display: grid; grid-template-columns: 1fr 1fr 120px; gap: 8px; width: 100%; }
.personal-tools button { min-height: 44px; background: var(--paper); border: 1px solid var(--border); border-radius: 6px; color: var(--accent); font-size: 12px; white-space: nowrap; }
.personal-tools button[aria-pressed="true"] { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.personal-tools button:disabled { opacity: .4; }
.font-controls { display: grid; grid-template-columns: 44px 32px 44px; align-items: center; }
.font-controls output { text-align: center; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.personal-notice { text-align: center; margin-top: 7px; color: var(--muted); font-size: 10px; }
.personal-notice.is-error { color: #9b3c25; }
.toolbar-handle { display: flex; justify-content: center; }
.toolbar-handle button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; min-width: 150px; padding: 5px 20px; border: 0; border-radius: 24px; background: transparent; color: var(--muted); font-size: 11px; }
.toolbar-handle button:hover { background: var(--sage); }
.ig-action-bar.is-collapsed { padding-block: 0 env(safe-area-inset-bottom, 0px); box-shadow: none; }
.ig-action-bar.is-collapsed .toolbar-handle button { min-height: 44px; }
#actionStatus { text-align: center; font-size: 12px; color: #9b3c25; }
#actionStatus:empty { display: none; }
.ai-info-icon { flex-shrink: 0; padding: 7px 10px; border: 1px solid var(--border); border-radius: 20px; background: transparent; color: var(--muted); font: 11px var(--sans); min-height: 36px; }
.ai-modal { position: fixed; inset: 0; background: #29312466; backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 200; }
.ai-modal-content { display: flex; flex-direction: column; width: 100%; max-width: 420px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); padding: clamp(18px, 5vw, 30px); background: var(--paper); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 20px 60px #242b2330; }
.ai-modal-content h3 { flex-shrink: 0; font-family: var(--serif); font-size: 21px; font-weight: 500; }
.ai-modal-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 20px 0 24px; font-size: 14px; line-height: 1.9; color: var(--muted); }
.modal-close-btn { flex-shrink: 0; width: 100%; min-height: 44px; color: var(--paper); background: var(--accent); border: 0; border-radius: 6px; }
@media (max-width: 768px) {
    .reader-header { padding: 0 20px; }
    .card-slide { padding: calc(var(--reader-top) + 16px) 16px calc(var(--qt-toolbar-height) + 24px); }
    .card { padding: 28px 24px; border-radius: 9px; }
    .header-card { padding: 30px 26px 24px; }
    .header-card { text-align: center; }
    .header-card h1 { margin-inline: auto; font-size: 30px; }
    .header-card .hero-subtitle { max-width: 290px; margin-inline: auto; font-size: 12px; }
    .hero-rule { margin: 26px auto 20px; }
    .hero-invitation { max-width: 300px; margin-inline: auto; }
    .intro-actions { justify-content: center; gap: 10px; margin-top: 24px; }
    .start-reading { min-width: 0; width: min(190px, 70%); padding-inline: 19px; }
    .intro-actions .like-btn { min-width: 56px; min-height: 48px; }
    h1 { font-size: 32px; margin-top: 22px; }
    h2 { font-size: 23px; }
    .hero-invitation { font-size: 17px; }
    .nav-button { display: none; }
    .indicators { gap: 0; padding: 0 12px; }
    .indicator { flex: 1; max-width: 100px; min-width: 0; padding: 0 8px; font-size: 12px; }
    .verse { gap: 10px; }
    .verse-num { flex-basis: 18px; }
    .verse-text { font-size: calc(1.05rem * var(--reading-scale)); line-height: 2; }
    .footer-message { margin-top: 26px; gap: 10px; flex-direction: column; justify-content: center; padding-top: 20px; }
    .footer-message p { font-size: 11px; text-align: center; line-height: 1.8; }
    .logo-container img { width: 48px; height: 48px; }
    .ig-action-bar { padding-inline: 14px; }
    .personal-tools { gap: 6px; }
    .toolbar-handle button { min-height: 36px; }
}
.background-section { margin-top: 28px; }
.background-section h3 { font-size: calc(1.03rem * var(--reading-scale)); color: var(--accent); line-height: 1.6; margin-bottom: 12px; }
.context-guide { margin: 24px 0 32px; border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: #f8f7ed; }
.context-guide-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; color: var(--accent); font-size: 15px; font-weight: 650; margin-bottom: 12px; }
.context-guide-ref { color: var(--muted); font-size: 12px; font-weight: 400; }
.context-visual { border-top: 1px solid var(--border); }
.context-visual > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; padding: 16px 2px; font-size: 15px; font-weight: 600; min-height: 52px; color: var(--accent); list-style: none; }
.context-visual > summary::-webkit-details-marker { display: none; }
.context-visual > summary::after { content: ''; flex-shrink: 0; width: 8px; height: 8px; margin-right: 5px; border-right: 1.5px solid #7b846f; border-bottom: 1.5px solid #7b846f; transform: rotate(45deg); transition: transform var(--motion-medium) var(--ease-out); }
.context-visual > summary[aria-expanded="true"]::after, .context-visual[open] > summary:not([aria-expanded])::after { transform: rotate(225deg); }
.context-visual > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.context-map { margin: 0 0 16px; }
.context-map img { display: block; width: 100%; max-width: 480px; height: auto; margin: auto; border-radius: 12px; }
.context-map figcaption, .context-sources, .context-guide-note { font-size: 12px; line-height: 1.8; color: var(--muted); overflow-wrap: anywhere; }
.context-map figcaption { margin-top: 12px; }
.context-map figcaption a { display: inline-block; padding-block: 8px; font-weight: 600; color: var(--accent); }
.context-sources { padding-bottom: 16px; }
.context-sources a { text-underline-offset: 3px; }
.context-guide-note { margin-top: 10px; }
.context-relations { display: grid; gap: 12px; padding-bottom: 18px; }
.context-relation { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: center; gap: 8px; }
.context-relation strong { background: var(--paper); border: 1px solid #d0d7c4; border-radius: 10px; padding: 11px 8px; font-size: 14px; text-align: center; line-height: 1.65; overflow-wrap: anywhere; }
.context-connection { font-size: 12px; color: #677557; text-align: center; line-height: 1.7; }
.context-connection > span { display: block; font-size: 22px; line-height: 1.2; }
.context-timeline { list-style: none; padding: 0; margin: 0 0 18px; }
.context-timeline li { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding-bottom: 23px; }
.context-timeline li:not(:last-child)::after { content: ''; position: absolute; left: 14px; top: 32px; bottom: 3px; width: 1px; background: #b8c3aa; }
.context-step { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--sage); color: var(--accent); font-size: 13px; }
.context-timeline h4 { font-size: 15px; line-height: 1.6; margin: 1px 0 5px; color: var(--accent); }
.context-timeline p { font-size: 14px; line-height: 1.85; }
.context-verse-ref { display: inline-block; font-size: 12px; color: var(--muted); margin-top: 5px; }
@media (max-width: 480px) {
    .context-guide { padding: 12px; margin-inline: -5px; }
    .context-relation { grid-template-columns: 1fr; gap: 4px; padding: 8px 0; }
    .context-relation strong { padding: 10px; }
    .context-connection > span { transform: rotate(90deg); }
    .context-connection { font-size: 13px; }
    .background-section h3 { font-size: calc(1rem * var(--reading-scale)); }
}
@media (max-width: 350px) {
    .card-slide { padding-inline: 10px; }
    .card { padding: 25px 19px; }
    h1 { font-size: 29px; }
    .start-reading { min-width: 0; }
    .intro-actions { gap: 9px; }
    .ig-action-bar { padding-inline: 10px; }
}
