@charset "UTF-8";

/* 字體 */
@font-face {
    font-family: "Noto Sans TC";
    src: url(../fonts/NotoSansTC-VariableFont_wght.ttf);
}

/* 基本 */
:where(body) {
    --padding: 0 45px;
    --max-width: 892px;
}

* {
    font-family: "Noto Sans TC", sans-serif;
    font-weight: 400;
    line-height: 2.0em;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-text-size-adjust: none;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

html,
body {
    max-width: 100%;
}

body {
    overflow-x: hidden;
    font-size: 18px;
    letter-spacing: 0.04em;
    background: var(--background-color);
}

.text-content,
.interface {
    margin: 0 auto 3.0em;
    padding: var(--padding);
    width: 100%;
    max-width: var(--max-width);
}

h1 {
    text-align: center;
    font-size: 3.0em;
    margin-top: 1.8em;
    margin-bottom: 1.8em;
}

.subtitle {
    font-size: 1.8em;
    margin: -0.5em 0 0;
}

h2 {
    font-size: 1.8em;
    line-height: 1.4em;
    margin-top: 1.8em;
    margin-bottom: 1.0em;
    padding-bottom: 0.8em;
}

h3 {
    font-size: 1.5em;
    margin-top: 1.8em;
    margin-bottom: 1.0em;
    padding-bottom: 0.8em;
}

h4 {
    font-size: 1.3em;
    margin-top: 1.8em;
    margin-bottom: 0.5em;
}

h5 {
    font-size: 1.1em;
}

h6 {
    text-align: right;
    font-size: 0.8em;
    margin-top: -1.4em;
}

p {
    margin-bottom: 1.2em;
}

h2,
h3 {
    border-bottom: 1px solid var(--border-color);
}

h3,
h4,
h4 a,
h5 {
    font-weight: 500;
}

a:link {
    text-underline-offset: 0.15em;
}

.quote {
    text-align: center;
    font-size: 1.3em;
    margin: 4.0em 0 5.0em;
}

.quote .chapter-verse {
    font-size: 0.6em;
}

h4.information {
    font-size: 1.1em;
    margin-top: 3.0em;
}

p.information {
    font-size: 0.8em;
}

.chapter-end {
    margin-top: 1.0em;
    margin-bottom: 1.0em;
}

#online-container {
    display: block;
    overflow: hidden;
    max-height: 0;
    pointer-events: none;
    transition: max-height 0.6s ease-in-out;
}

#online-toggle {
    font-size: 0.8em;
    text-align: center;
    width: fit-content;
    margin: 20px auto 0;
    padding: 0.25em 1.5em 0.325em;
    color: var(--page-number-color);
    border: 1px solid var(--page-number-color);
    border-radius: 2.0em;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    cursor: pointer;
}

/* 文字色彩 */
body,
body a {
    color: var(--text-color);
}

h1,
h2,
h3 {
    color: var(--heading-color);
}

h4,
h4 a {
    color: var(--subheading-color);
}

h5,
h6 {
    color: var(--accent-color);
}

.verse,
.verse a {
    color: var(--accent-color);
}

/* 圖片 */
img {
    max-width: 100%;
    margin-top: 0.6em;
}

figcaption {
    font-size: 0.85em;
    line-height: 1.6em;
    margin-bottom: 1.8em;
}

/* 頁碼 */
#page-grid {
    font-size: 0.85em;
    text-align: center;
    margin: 2.0em auto;
    display: grid;
    grid-template-columns: repeat(6, auto);
    grid-row-gap: 6px;
    column-gap: 6px;
}

#page-grid a {
    text-decoration: none;
    padding: 0 0 0.1em;
    border: 1px solid var(--dim-border-color);
}

.blank-page {
    margin: 90px auto 120px;
    /* 以下必須與書籤一致 */
    display: none;
    width: fit-content;
    color: var(--border-color);
    text-align: center;
    padding: 0.5em 1.5em 0.65em;
    border: 1px solid var(--border-color);
    border-radius: 2.0em;
}

.page-id {
    display: block;
    position: absolute;
}

.page-number,
.page-separator {
    display: none;
    width: 100vw;
    font-size: 0.8em;
    text-align: center;
    text-indent: 0;
    color: var(--page-number-color);
    margin: 0 calc((100vw - 100%) * -0.5) 2.0em;
    padding-top: 0.5em;
    border-top: 1px dashed var(--border-color);
}

.page-separator {
    display: block;
}

.blank-page,
.page-number,
.page-separator {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    cursor: default;
}

.page-number::before {
    content: "原著：第 ";
}

.page-number::after {
    content: " 頁";
}

.spacer {
    display: none;
    margin-top: 3.5em;
}

/* 目錄 */
#table-of-contents h4 {
    color: var(--accent-color);
    margin-top: 1.2em;
    margin-bottom: 0;
}

#table-of-contents p {
    line-height: 1.6em;
    margin-bottom: 0;
}

.chapter-break {
    display: none;
}

@media only screen and (max-width: 892px) {
    :where(body) {
        --padding: 0 5%;
    }

    .chapter-break {
        display: inline;
    }
}

@media only screen and (max-width: 599px) {
    .picture-break {
        display: none;
    }
}

@media only screen and (max-width: 479px) {
    .lyric-break {
        display: none;
    }
}

@media only screen and (max-width: 413px) {
    body {
        font-size: 15px;
    }
}

@media only screen and (max-width: 383px) {
    h1 {
        font-size: 2.6em;
    }

    .subtitle {
        font-size: 1.5em;
    }

    .quote {
        font-size: 1.1em;
    }
}