/* 旅途数值只用文字与数值表达，不用颜色区分好坏。 */
.journal-identity {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    margin: 0.3rem 0 0.5rem;
}

.journal-stats {
    display: flex;
    gap: 1.4rem;
    padding: 0.5rem 0;
    border-block: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
}

.journal-stats b {
    font-size: 1.1rem;
    font-variant-numeric: tabular-nums;
}

.journal-favor-title {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.journal-favor {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.65rem;
    margin-bottom: 0.7rem;
    font-size: 0.78rem;
}

.journal-body {
    max-height: min(65vh, 540px);
    overflow-y: auto;
}

#chapter-continue {
    margin-top: 0.6rem;
    width: 100%;
}

.dialogue-box {
    max-height: 88dvh;
    overflow-y: auto;
}

.npc-question {
    margin: 0 1.5rem 0.7rem;
    padding: 0.9rem 1rem;
    border: 1px solid #b8941f;
    border-left-width: 4px;
    border-radius: 10px;
    background: #fbf6e9;
    color: #332a20;
}

.npc-question[hidden] {
    display: none;
}

.npc-question-label {
    font-size: 0.76rem;
    color: #66533c;
    margin-bottom: 0.3rem;
}

#npc-question-text {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    line-height: 1.6;
}

.npc-answer-options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.6rem;
}

.npc-answer-options button {
    padding: 0.6rem 0.8rem;
    min-height: 42px;
    background: #fffdf7;
    color: #332a20;
    border: 1px solid #c7b890;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 0.86rem;
}

.npc-answer-options button:hover {
    background: #f4e4c1;
}

.npc-answer-options button:focus-visible {
    outline: 2px solid #7c512c;
    outline-offset: 2px;
}

.choice-effect {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.76rem;
    line-height: 1.5;
    color: #66533c;
}

.choice-box {
    max-height: 90dvh;
    overflow-y: auto;
}

.knowledge-source, .knowledge-review, .knowledge-chapter {
    font-size: 0.76rem;
    line-height: 1.6;
    color: #66533c;
}

.knowledge-source a, .message-sources a {
    color: inherit;
    text-decoration: underline;
}

.journey-note, .dialogue-mode {
    font-size: 0.78rem;
    line-height: 1.6;
    color: #66533c;
    margin: 0.5rem 0;
}

.dialogue-mode { margin: 0 1.5rem; }
.ending-stats { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; justify-content: center; }
.ending-stats span { white-space: nowrap; }
.ending-recap { list-style: none; text-align: left; font-size: 0.85rem; line-height: 1.8; margin-top: 1rem; }
#choice-rescue { margin-bottom: 0.8rem; }

@media (max-width: 768px) {
    body.dialogue-open .journal-body { display: none; }
    .dialogue-mode { margin: 0 0.7rem; }

    .journal-body {
        max-height: 40dvh;
    }

    .dialogue-content {
        max-height: 24dvh;
        padding: 0.7rem 1rem;
    }

    .npc-question {
        margin: 0 0.7rem 0.4rem;
        padding: 0.6rem;
    }

    .dialogue-input {
        padding: 0.6rem 0.7rem;
        gap: 0.4rem;
    }

    .dialogue-input input {
        min-width: 0;
        width: 100%;
        padding: 0.6rem;
    }

    .dialogue-input button {
        padding: 0.6rem 1rem;
        flex-shrink: 0;
    }

    .quick-questions {
        padding: 0.2rem 0.7rem 0.7rem;
    }
}

/* 出航方案：像手记中摊开的执行单，保持与对话/旁白互斥。 */
.journal-departure {
    margin-top: 0.8rem;
    padding-top: 0.7rem;
    border-top: 1px solid rgba(124, 81, 44, 0.28);
}
.journal-departure h4 { margin: 0 0 0.35rem; font-family: var(--font-serif); }
#departure-records { margin: 0.35rem 0 0.65rem; padding-left: 1.1rem; font-size: 0.78rem; line-height: 1.55; }
#departure-records li { margin: 0.15rem 0; }

.departure-panel[hidden] { display: none; }
.departure-panel {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    place-items: center;
    padding: clamp(0.75rem, 3vw, 2rem);
    background: rgba(35, 28, 20, 0.66);
}
.departure-dialog {
    width: min(720px, 100%);
    max-height: min(92dvh, 820px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fffdf7;
    color: #332a20;
    border: 1px solid #b8941f;
    border-radius: 12px;
    box-shadow: 0 14px 48px rgba(30, 21, 13, 0.34);
}
.departure-header, .departure-footer {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.15rem;
    background: #fbf6e9;
}
.departure-header { justify-content: space-between; border-bottom: 1px solid #d9c898; }
.departure-header h2 { margin: 0; font-family: var(--font-serif); font-size: 1.25rem; }
.departure-header button, .departure-footer button, .departure-writing-actions button,
.departure-manual button {
    min-height: 40px;
    padding: 0.55rem 0.85rem;
    border: 1px solid #8d6a27;
    border-radius: 6px;
    background: #fffdf7;
    color: #332a20;
    font: inherit;
    cursor: pointer;
}
.departure-header button:hover, .departure-footer button:hover, .departure-writing-actions button:hover,
.departure-manual button:hover { background: #f4e4c1; }
.departure-scroll {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem 1.15rem 1.25rem;
}
.departure-scroll h3, .departure-scroll h4 { font-family: var(--font-serif); }
.departure-scroll h3 { margin: 0.2rem 0 0.55rem; font-size: 1.03rem; }
.departure-scroll h4 { margin: 0.7rem 0 0.3rem; font-size: 0.97rem; }
.departure-note, .departure-scroll p { line-height: 1.65; }
.departure-note { color: #66533c; font-size: 0.8rem; }
#departure-missing { padding-left: 1.2rem; line-height: 1.7; }
.departure-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin: 0.65rem 0 1.1rem; }
.departure-presets button {
    min-height: 130px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    text-align: left;
    border: 1px solid #c7b890;
    border-top: 3px solid #b8941f;
    border-radius: 7px;
    background: #fffdf7;
    color: #332a20;
    font: inherit;
    cursor: pointer;
}
.departure-presets button:hover { background: #f9efd7; }
.departure-presets strong { font-family: var(--font-serif); }
.departure-presets span { font-size: 0.78rem; line-height: 1.45; }
.departure-preset-link { margin-top: auto; color: #7c512c; text-decoration: underline; }
.departure-writing { border-top: 1px solid #e0d5b8; padding-top: 0.75rem; }
.departure-writing h3 { margin-top: 0; }
#departure-draft { width: 100%; min-height: 7rem; box-sizing: border-box; resize: vertical; padding: 0.7rem; border: 1px solid #b9a983; border-radius: 6px; background: #fffefa; color: #332a20; font: inherit; line-height: 1.6; }
.departure-writing-actions { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.departure-manual { margin: 1rem 0 0; padding: 0.8rem; border: 1px solid #d9c898; border-radius: 7px; }
.departure-manual legend { padding: 0 0.3rem; font-family: var(--font-serif); }
.departure-manual label:not(.departure-accept) { display: block; margin-top: 0.55rem; font-size: 0.8rem; color: #66533c; }
.departure-manual select { width: 100%; min-height: 40px; margin-top: 0.25rem; padding: 0.45rem; border: 1px solid #b9a983; border-radius: 5px; background: #fffefa; color: #332a20; font: inherit; }
.departure-accept { display: flex; align-items: flex-start; gap: 0.45rem; margin: 0.75rem 0; font-size: 0.83rem; line-height: 1.5; }
.departure-accept input { width: 1.1rem; height: 1.1rem; margin-top: 0.1rem; }
.departure-preview, #departure-result { margin-top: 1rem; padding: 0.85rem; border: 1px solid #b8941f; border-left-width: 4px; border-radius: 7px; background: #fbf6e9; }
.departure-preview:focus, #departure-result:focus { outline: 2px solid #7c512c; outline-offset: 2px; }
.departure-preview ol, .departure-preview ul, #departure-result ul { padding-left: 1.2rem; line-height: 1.7; }
.departure-preview blockquote { margin: 0.5rem 0; padding: 0.5rem 0.7rem; border-left: 3px solid #c7b890; color: #66533c; line-height: 1.6; }
.departure-receipt-cost { font-weight: 600; }
.departure-footer { flex-wrap: wrap; justify-content: flex-end; border-top: 1px solid #d9c898; }
#departure-feedback { flex: 1 1 100%; min-height: 1.4em; margin: 0; color: #66533c; font-size: 0.82rem; line-height: 1.45; }
#departure-feedback.is-error { color: #8b1538; }
#departure-confirm { background: #7c512c; color: #fffdf7; }
#departure-confirm:disabled { opacity: 0.55; cursor: not-allowed; }
#departure-read { background: #d4af37; }
.dialogue-evidence { margin: 0 1.5rem 0.7rem; padding: 0.65rem 0.8rem; border: 1px solid #d9c898; border-radius: 7px; background: #fffdf7; }
.dialogue-evidence[hidden] { display: none; }
.dialogue-evidence label { display: block; margin-bottom: 0.3rem; font-size: 0.78rem; color: #66533c; }
#departure-reference { width: 100%; min-height: 36px; padding: 0.35rem; border: 1px solid #b9a983; border-radius: 4px; background: #fffefa; color: #332a20; font: inherit; }
.dialogue-evidence p { margin: 0.35rem 0 0; color: #66533c; font-size: 0.74rem; }
.departure-panel button:focus-visible, .departure-panel textarea:focus-visible, .departure-panel select:focus-visible, .departure-panel input:focus-visible, .dialogue-evidence select:focus-visible { outline: 2px solid #7c512c; outline-offset: 2px; }

@media (max-width: 600px) {
    .departure-panel { padding: 0; place-items: stretch; }
    .departure-dialog { width: 100%; max-height: 100dvh; min-height: 100dvh; border: 0; border-radius: 0; }
    .departure-header, .departure-footer { padding: 0.7rem 0.85rem; }
    .departure-scroll { padding: 0.85rem; }
    .departure-presets { grid-template-columns: 1fr; }
    .departure-presets button { min-height: 0; }
    .departure-footer button { flex: 1 1 auto; }
    .dialogue-evidence { margin: 0 0.7rem 0.4rem; }
}
@media (prefers-reduced-motion: reduce) {
    .departure-panel *, .departure-panel { transition: none !important; animation: none !important; }
}
