/* Dao De Jing — page-specific styles for the hover-translate reader. */

.ddj-intro {
    margin-bottom: 2.5rem;
    font-family: Verdana, sans-serif;
    font-size: 0.95em;
    color: #444;
}

.ddj-intro p { text-indent: 0; }

.ddj-intro .ddj-byline {
    text-align: center;
}

.ddj-hint {
    background: #f5f5f5;
    border-left: 0.5em solid #4e92df;
    padding: 0.6em 1em;
    margin: 1em 0;
    font-size: 0.92em;
    border-radius: 6px;
}

.ddj-chapter {
    margin: 2.5rem 0;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e5e5;
}

.ddj-chapter:last-child { border-bottom: none; }

.ddj-chapter-head {
    font-family: "Courier New", Courier, monospace;
    font-size: 1.05em;
    color: #4e92df;
    margin-bottom: 0.6rem;
    text-align: left;
}

.ddj-chapter-head .num { font-weight: bold; margin-right: 0.5em; }
.ddj-chapter-head .title { font-style: italic; color: #666; }

.ddj-zh {
    font-size: 1.5em;
    line-height: 2.1;
    text-align: justify;
    margin: 0.4em 0 1.2em;
    font-family: "Songti SC", "SimSun", "Noto Serif CJK SC", serif;
}

.ddj-en {
    font-family: Verdana, sans-serif;
    font-size: 0.97em;
    text-align: left;
    color: #222;
}

.ddj-en p { text-indent: 0; margin: 0 0 0.7em; }

.ddj-en .poem {
    margin: 0.7em 0 1em 1em;
    font-style: italic;
    color: #333;
    white-space: pre-line;
}

.hz {
    position: relative;
    cursor: help;
    border-radius: 3px;
    padding: 0 1px;
    transition: background-color 120ms ease;
}

.hz:hover,
.hz:focus-visible {
    background-color: #e6f1fb;
    outline: none;
}

.ddj-punct { color: #888; padding: 0 1px; }

#ddj-tooltip {
    position: fixed;
    z-index: 9999;
    background: #1d2733;
    color: #f4f4f4;
    padding: 0.55rem 0.8rem;
    border-radius: 6px;
    font-family: Verdana, sans-serif;
    font-size: 0.85rem;
    max-width: 320px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 100ms ease, transform 100ms ease;
}

#ddj-tooltip.show { opacity: 1; transform: translateY(0); }

#ddj-tooltip .tt-char {
    font-size: 1.4em;
    font-family: "Songti SC", "SimSun", "Noto Serif CJK SC", serif;
    margin-right: 0.45em;
    vertical-align: -2px;
}

#ddj-tooltip .tt-pinyin {
    color: #ffd166;
    font-weight: 600;
    font-size: 1em;
}

#ddj-tooltip .tt-def {
    margin-top: 0.35rem;
    color: #e9e9e9;
    line-height: 1.35;
}

#ddj-tooltip .tt-missing { color: #aaa; font-style: italic; }

.ddj-toc {
    font-family: Verdana, sans-serif;
    font-size: 0.85em;
    line-height: 1.7;
    background: #fafafa;
    padding: 1em 1.3em;
    border-radius: 8px;
    margin: 1.5em 0;
}

.ddj-toc a {
    display: inline-block;
    min-width: 2.4em;
    text-align: right;
    color: #4e92df;
    text-decoration: none;
    padding-right: 0.6em;
}

.ddj-toc a:hover { text-decoration: underline; }

.ddj-status {
    text-align: center;
    font-family: Verdana, sans-serif;
    color: #888;
    padding: 2em 0;
}

.ddj-title-zh {
    text-align: center;
}

.ddj-content {
    text-align: left;
}

@media (max-width: 768px) {
    .ddj-zh { font-size: 1.3em; line-height: 1.95; }
    #ddj-tooltip { font-size: 0.8rem; }
}
