/* ===== 人生设计室 · 温暖纸感 ===== */
:root {
    /* paper & ink */
    --paper: #faf6ef;          /* 米白纸面 */
    --paper-2: #f3ecdf;        /* 略深的纸 */
    --card: #fffdf8;           /* 卡片 */
    --ink: #3d3427;            /* 墨色(暖棕黑) */
    --ink-soft: #6f6350;       /* 次级文字 */
    --muted: #a2937c;          /* 更淡 */
    --line: #e7dcc8;           /* 分隔线 */

    /* accent 赭橙 */
    --accent: #c1683f;
    --accent-deep: #a9552f;
    --accent-soft: #f2ddcd;
    --accent-faint: #f8ece2;

    /* user bubble 暖橙 */
    --user-bubble: #d98a52;
    --user-ink: #fffaf3;

    --shadow: 0 1px 2px rgba(80, 62, 40, 0.06), 0 8px 24px rgba(80, 62, 40, 0.06);
    --radius: 18px;

    --serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", Georgia, serif;
    --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--sans);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.75;
    /* 细腻纸纹理 */
    background-image:
        radial-gradient(rgba(193, 104, 63, 0.025) 1px, transparent 1px);
    background-size: 22px 22px;
    overflow: hidden;
}

.app { height: 100vh; }

.chat-area {
    height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Top bar ===== */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 4px 14px;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--serif);
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
}

.brand-mark { color: var(--accent); font-size: 1.15rem; }

.journey {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    flex: 1;
}

.journey-step {
    font-size: 0.78rem;
    color: var(--muted);
    padding: 4px 11px;
    border-radius: 999px;
    transition: all 0.3s;
    position: relative;
    white-space: nowrap;
}

.journey-step + .journey-step::before {
    content: "·";
    position: absolute;
    left: -5px;
    color: var(--line);
}

.journey-step.active {
    color: var(--accent-deep);
    background: var(--accent-faint);
    font-weight: 600;
}

.journey-step.done {
    color: var(--ink-soft);
}

.restart-link {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    white-space: nowrap;
    transition: all 0.2s;
}

.restart-link:hover { color: var(--accent-deep); background: var(--accent-faint); }

.session-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.delete-link {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 0.78rem;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
}

.delete-link:hover { color: #a33f34; background: #f8e8e4; }

/* ===== Export bar ===== */
.export-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    margin: 14px 4px 0;
    border: 1px solid var(--accent-soft);
    border-radius: 14px;
    background: var(--accent-faint);
    color: var(--accent-deep);
    font-size: 0.92rem;
    animation: rise 0.4s ease;
}

.export-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ===== Welcome ===== */
.welcome {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
}

.welcome-content {
    text-align: center;
    max-width: 620px;
    animation: rise 0.6s ease;
}

.welcome-sigil {
    font-size: 2.6rem;
    color: var(--accent);
    margin-bottom: 10px;
}

.welcome-content h1 {
    font-family: var(--serif);
    font-size: 2.3rem;
    line-height: 1.3;
    margin: 0 0 16px;
    letter-spacing: 0.02em;
    color: var(--ink);
}

.welcome-sub {
    color: var(--ink-soft);
    font-size: 1.05rem;
    margin: 0 0 30px;
    line-height: 1.9;
}

.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 34px;
}

.feature {
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--line);
    font-size: 0.85rem;
    color: var(--ink-soft);
    box-shadow: var(--shadow);
}

.welcome-note {
    margin-top: 22px;
    font-size: 0.8rem;
    color: var(--muted);
}

.consent-box {
    max-width: 560px;
    margin: 20px auto 0;
    padding: 14px 16px;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 253, 248, 0.72);
}

.consent-box label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--ink-soft);
    font-size: 0.78rem;
    line-height: 1.6;
}

.consent-box label + label { margin-top: 9px; }
.consent-box input { margin-top: 4px; accent-color: var(--accent); }
.consent-box a { color: var(--accent-deep); }

/* ===== Buttons ===== */
.btn-primary {
    background: var(--accent);
    color: #fffaf3;
    border: none;
    padding: 12px 26px;
    border-radius: 999px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 14px rgba(193, 104, 63, 0.28);
    transition: all 0.2s;
}

.btn-primary:disabled {
    opacity: 0.52;
    cursor: not-allowed;
}

.confirmation-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    margin: 12px 4px 0;
    border: 1px solid var(--accent-soft);
    border-radius: 14px;
    background: var(--accent-faint);
    animation: rise 0.35s ease;
}

.confirmation-bar div {
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

.confirmation-bar strong { color: var(--accent-deep); }
.confirmation-bar span { color: var(--ink-soft); font-size: 0.82rem; }

.legal-body {
    min-height: 100%;
    height: auto;
    overflow: auto;
}

.legal-page {
    width: min(760px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 80px;
}

.legal-page h1,
.legal-page h2 {
    font-family: var(--serif);
    color: var(--ink);
}

.legal-page h1 { font-size: 2.2rem; margin: 18px 0 4px; }
.legal-page h2 { font-size: 1.2rem; margin: 32px 0 8px; }
.legal-page p { color: var(--ink-soft); }
.legal-back { color: var(--accent-deep); text-decoration: none; }
.legal-updated { color: var(--muted) !important; font-size: 0.85rem; }

.btn-primary:hover {
    background: var(--accent-deep);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(193, 104, 63, 0.34);
}

.btn-primary:disabled {
    background: var(--muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary.large { padding: 15px 38px; font-size: 1.08rem; }

.btn-secondary {
    background: var(--card);
    color: var(--accent-deep);
    border: 1px solid var(--accent-soft);
    padding: 11px 20px;
    border-radius: 999px;
    font-size: 0.92rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
}

/* ===== Blueprint reader ===== */
body.report-open { overflow: hidden; }

.report-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(61, 52, 39, 0.52);
    backdrop-filter: blur(8px);
}

.report-shell {
    width: min(920px, 100%);
    height: min(92vh, 980px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 24px 80px rgba(61, 52, 39, 0.28);
    animation: rise 0.3s ease;
}

.report-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 30px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.96);
}

.report-eyebrow {
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.report-toolbar h2 {
    margin: 2px 0 0;
    font-family: var(--serif);
    font-size: 1.35rem;
    line-height: 1.3;
}

.report-close {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--paper);
    color: var(--ink-soft);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.report-close:hover {
    border-color: var(--accent-soft);
    background: var(--accent-faint);
    color: var(--accent-deep);
}

.report-scroll {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    background:
        linear-gradient(rgba(193, 104, 63, 0.018) 1px, transparent 1px),
        var(--paper);
    background-size: 100% 30px;
}

.report-article {
    width: min(720px, calc(100% - 56px));
    margin: 0 auto;
    padding: 64px 0 84px;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.95;
}

.report-article h1,
.report-article h2,
.report-article h3 {
    font-family: var(--serif);
    color: var(--ink);
    text-wrap: balance;
}

.report-article h1 {
    margin: 0 0 40px;
    font-size: clamp(2rem, 5vw, 2.7rem);
    line-height: 1.35;
    text-align: center;
}

.report-article h1::after {
    content: "";
    display: block;
    width: 64px;
    height: 3px;
    margin: 24px auto 0;
    border-radius: 999px;
    background: var(--accent);
}

.report-article h2 {
    margin: 58px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    font-size: 1.55rem;
    line-height: 1.45;
}

.report-article h3 {
    margin: 34px 0 12px;
    color: var(--accent-deep);
    font-size: 1.16rem;
}

.report-article p { margin: 0 0 18px; }

.report-article blockquote {
    margin: 30px 0;
    padding: 20px 24px;
    border-left: 4px solid var(--accent);
    border-radius: 0 14px 14px 0;
    background: var(--accent-faint);
    color: var(--ink-soft);
    font-family: var(--serif);
    font-size: 1.08rem;
}

.report-article ul,
.report-article ol {
    margin: 14px 0 24px;
    padding-left: 1.5em;
}

.report-article li { margin: 8px 0; }
.report-article li::marker { color: var(--accent); }

.report-action-card {
    margin: 8px 0 30px;
    padding: 24px 26px 20px;
    border: 1px solid var(--accent-soft);
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0, rgba(193, 104, 63, 0.12), transparent 42%),
        var(--accent-faint);
    box-shadow: 0 10px 28px rgba(91, 66, 46, 0.08);
}

.report-action-card h2 {
    margin: 0 0 14px;
    padding: 0;
    border: 0;
    color: var(--accent-deep);
    font-size: 1.35rem;
}

.report-action-card ul,
.report-action-card ol {
    margin-bottom: 0;
}

.report-full-details {
    margin-top: 26px;
    border-top: 1px solid var(--line);
}

.report-full-details > summary {
    margin: 0;
    padding: 18px 4px;
    color: var(--accent-deep);
    font-weight: 700;
    cursor: pointer;
    list-style-position: inside;
}

.report-full-details > summary:hover {
    color: var(--accent);
}

.report-full-content {
    padding-top: 2px;
}

.report-full-content > h2:first-child {
    margin-top: 34px;
}

.completion-feedback {
    margin: 10px 4px 0;
    padding: 16px 24px;
    border: 1px solid var(--accent-soft);
    border-radius: 14px;
    background: var(--accent-faint);
    animation: rise 0.35s ease;
    outline: none;
}

.feedback-question-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.feedback-eyebrow {
    color: var(--accent-deep);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.feedback-question-row p {
    margin: 1px 0 0;
    color: var(--ink);
    font-family: var(--serif);
    font-weight: 700;
}

.feedback-rating {
    display: flex;
    gap: 7px;
}

.feedback-rating button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--accent-soft);
    border-radius: 50%;
    background: var(--card);
    color: var(--ink-soft);
    cursor: pointer;
}

.feedback-rating button:hover,
.feedback-rating button.selected {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.feedback-details > p {
    margin: 13px 0 7px;
    color: var(--ink-soft);
    font-size: 0.76rem;
}

.feedback-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.feedback-tags button {
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    color: var(--ink-soft);
    font-size: 0.74rem;
    cursor: pointer;
}

.feedback-tags button:hover,
.feedback-tags button.selected {
    border-color: var(--accent-soft);
    background: var(--accent-soft);
    color: var(--accent-deep);
}

.feedback-comment-row {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    margin-top: 10px;
}

.feedback-comment-row textarea {
    flex: 1;
    min-height: 48px;
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 10px;
    background: var(--card);
    color: var(--ink);
    font: inherit;
    font-size: 0.78rem;
    line-height: 1.5;
}

.feedback-comment-row .btn-secondary {
    flex: 0 0 auto;
    padding: 9px 16px;
    font-size: 0.78rem;
}

.feedback-status {
    min-height: 1.3em;
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 0.72rem;
}

.report-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 24px;
    border-top: 1px solid var(--line);
    background: var(--card);
}

.report-status {
    max-width: 470px;
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.report-action-buttons {
    display: flex;
    gap: 9px;
    flex: 0 0 auto;
}

.report-action-buttons .btn-primary,
.report-action-buttons .btn-secondary {
    padding: 10px 18px;
    font-size: 0.88rem;
}

/* ===== Messages ===== */
.messages {
    flex: 1;
    overflow-y: auto;
    padding: 28px 4px 8px;
    scroll-behavior: smooth;
}

.message {
    display: flex;
    gap: 12px;
    margin-bottom: 22px;
    max-width: 92%;
    animation: rise 0.35s ease;
}

/* 教练:头像 + 无框正文,像写信 */
.message.coach {
    margin-right: auto;
    align-items: flex-start;
}

.avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-faint);
    border: 1px solid var(--accent-soft);
    color: var(--accent-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-top: 2px;
}

.message.coach .bubble {
    background: transparent;
    color: var(--ink);
    padding: 2px 4px;
    font-size: 1.0rem;
    line-height: 1.9;
}

.message.coach .bubble p {
    margin: 0 0 0.75em;
}

.message.coach .bubble p:last-child {
    margin-bottom: 0;
}

.message.coach .bubble h2,
.message.coach .bubble h3,
.message.coach .bubble h4 {
    margin: 1em 0 0.45em;
    color: var(--ink);
    font-family: var(--serif);
    line-height: 1.45;
}

.message.coach .bubble h2:first-child,
.message.coach .bubble h3:first-child,
.message.coach .bubble h4:first-child {
    margin-top: 0;
}

.message.coach .bubble h2 { font-size: 1.16rem; }
.message.coach .bubble h3 { font-size: 1.08rem; }
.message.coach .bubble h4 { font-size: 1rem; }

.message.coach .bubble ul,
.message.coach .bubble ol {
    margin: 0.45em 0 0.85em;
    padding-left: 1.45em;
}

.message.coach .bubble li {
    margin: 0.25em 0;
}

.message.coach .bubble blockquote {
    margin: 0.55em 0 0.85em;
    padding-left: 0.9em;
    border-left: 3px solid var(--accent-soft);
    color: var(--ink-soft);
}

.message.coach .bubble code {
    padding: 0.08em 0.3em;
    border-radius: 4px;
    background: var(--accent-faint);
    font-size: 0.9em;
}

.message.coach.streaming .bubble::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1.05em;
    margin-left: 4px;
    border-radius: 999px;
    background: var(--accent);
    vertical-align: -0.12em;
    animation: stream-caret 0.85s steps(1) infinite;
}

@keyframes stream-caret {
    50% { opacity: 0; }
}

/* 用户:暖橙气泡靠右 */
.message.user {
    margin-left: auto;
    justify-content: flex-end;
}

.message-body {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: 100%;
}

.message.user .bubble {
    background: var(--user-bubble);
    color: var(--user-ink);
    padding: 13px 18px;
    border-radius: var(--radius);
    border-bottom-right-radius: 5px;
    font-size: 0.98rem;
    white-space: pre-wrap;
    box-shadow: var(--shadow);
    max-width: 100%;
}

.message-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
    color: #a34a3a;
    font-size: 0.78rem;
}

.retry-btn {
    border: 1px solid var(--accent-soft);
    border-radius: 999px;
    background: var(--card);
    color: var(--accent-deep);
    padding: 3px 10px;
    font: inherit;
    cursor: pointer;
}

.retry-btn:hover { background: var(--accent-faint); }
.retry-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* 系统 / 错误 */
.message.system, .message.error {
    max-width: 100%;
    justify-content: center;
}

.message.system .bubble {
    text-align: center;
    color: var(--muted);
    font-size: 0.8rem;
    background: transparent;
}

.message.error .bubble {
    background: #fbeeee;
    color: #a34a3a;
    border: 1px solid #f0d5d0;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 0.88rem;
}

/* 打字呼吸动画 */
.typing-dots {
    display: inline-flex;
    gap: 5px;
    padding: 8px 2px;
}

.typing-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.typing-status {
    color: var(--muted);
    font-size: 0.78rem;
}

.typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--muted);
    animation: breathe 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes breathe {
    0%, 60%, 100% { transform: scale(0.7); opacity: 0.4; }
    30% { transform: scale(1); opacity: 1; }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Input bar ===== */
.input-bar {
    padding: 14px 4px 20px;
}

.site-footer {
    flex: 0 0 auto;
    padding: 4px 0 10px;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.4;
    text-align: center;
}

.site-footer a {
    color: inherit;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--accent-deep);
    text-decoration: underline;
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 12px 12px 12px 20px;
    box-shadow: var(--shadow);
    transition: border 0.2s, box-shadow 0.2s;
}

.input-wrapper:focus-within {
    border-color: var(--accent-soft);
    box-shadow: 0 4px 18px rgba(193, 104, 63, 0.16);
}

.input-wrapper textarea {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--ink);
    font-size: 1rem;
    font-family: var(--sans);
    resize: none;
    max-height: 180px;
    outline: none;
    line-height: 1.6;
    padding: 4px 0;
}

.input-wrapper textarea::placeholder { color: var(--muted); }

.input-wrapper textarea:disabled {
    color: var(--muted);
    cursor: wait;
}

.send-btn {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #fffaf3;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 3px 10px rgba(193, 104, 63, 0.3);
}

.send-btn:hover { background: var(--accent-deep); transform: scale(1.05); }
.send-btn:disabled { background: var(--muted); cursor: not-allowed; transform: none; box-shadow: none; }

/* 麦克风按钮 */
.mic-btn {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink-soft);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mic-btn:hover { color: var(--accent-deep); border-color: var(--accent-soft); background: var(--accent-faint); }

.mic-btn.recording {
    background: #e05c4a;
    border-color: #e05c4a;
    color: #fff;
    animation: pulse 1.4s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(224, 92, 74, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(224, 92, 74, 0); }
}

.input-actions {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.hint { font-size: 0.75rem; color: var(--muted); }

/* scrollbar */
.messages::-webkit-scrollbar { width: 8px; }
.messages::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.messages::-webkit-scrollbar-thumb:hover { background: var(--muted); }

.hidden { display: none !important; }

/* ===== 响应式 ===== */
/* 平板 */
@media (max-width: 768px) {
    .chat-area { padding: 0 14px; }
    .journey-step { font-size: 0.72rem; padding: 3px 8px; }
    .welcome-content h1 { font-size: 1.8rem; }
}

/* 手机 */
@media (max-width: 640px) {
    /* 用 dvh 适配手机键盘与地址栏 */
    .app, .chat-area { height: 100dvh; }
    body { overflow: hidden; }

    .chat-area { padding: 0 12px; }
    .topbar { padding: 12px 2px 10px; }
    .brand-name { display: none; }        /* 只留 ◍ 图标 */
    .delete-link { display: none; }
    .journey { gap: 2px; }
    .journey-step { font-size: 0.68rem; padding: 3px 6px; }
    .journey-step + .journey-step::before { content: ""; }

    .welcome { padding: 16px; }
    .welcome-content h1 { font-size: 1.5rem; }
    .welcome-sub { font-size: 0.95rem; }
    .welcome-sigil { font-size: 2rem; }
    .feature { font-size: 0.78rem; padding: 6px 12px; }

    .messages { padding: 18px 2px 6px; }
    .message { max-width: 100%; margin-bottom: 16px; }
    .avatar { width: 30px; height: 30px; font-size: 0.85rem; }
    .message.coach .bubble { font-size: 0.95rem; line-height: 1.8; }
    .message.user .bubble { font-size: 0.92rem; padding: 11px 15px; }

    .export-bar { align-items: flex-start; flex-direction: column; }
    .confirmation-bar { align-items: stretch; flex-direction: column; }
    .confirmation-bar .btn-primary { width: 100%; }
    .export-actions { width: 100%; justify-content: flex-start; }
    .export-actions .btn-primary, .export-actions .btn-secondary {
        flex: 1;
        min-width: 132px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .report-modal { padding: 0; }
    .report-shell {
        width: 100%;
        height: 100dvh;
        border: none;
        border-radius: 0;
    }
    .report-toolbar { padding: 16px 18px 13px; }
    .report-toolbar h2 { font-size: 1.15rem; }
    .report-close { width: 44px; height: 44px; }
    .report-article {
        width: calc(100% - 36px);
        padding: 42px 0 64px;
        font-size: 0.96rem;
        line-height: 1.85;
    }
    .report-article h1 { font-size: 1.8rem; }
    .report-article h2 { margin-top: 44px; font-size: 1.35rem; }
    .completion-feedback { padding: 12px 14px; }
    .feedback-question-row { align-items: flex-start; flex-direction: column; gap: 9px; }
    .feedback-rating button { width: 40px; height: 40px; }
    .feedback-comment-row { align-items: stretch; flex-direction: column; }
    .feedback-comment-row .btn-secondary { min-height: 42px; }
    .report-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    }
    .report-status { max-width: none; }
    .report-action-buttons { width: 100%; }
    .report-action-buttons .btn-primary,
    .report-action-buttons .btn-secondary {
        flex: 1;
        min-height: 44px;
        padding: 9px 10px;
    }

    .input-bar { padding: 10px 2px calc(12px + env(safe-area-inset-bottom)); }
    .mic-btn, .send-btn { width: 44px; height: 44px; }  /* 加大触控区 */
    .input-wrapper { padding: 8px 8px 8px 16px; border-radius: 20px; }
    .hint { font-size: 0.68rem; }
}

@media print {
    @page { margin: 16mm 18mm; }

    html, body {
        height: auto;
        overflow: visible;
        background: #fff;
    }

    body {
        color: #241f18;
        background-image: none;
    }

    .app,
    .report-toolbar,
    .report-actions {
        display: none !important;
    }

    .report-modal {
        position: static;
        display: block;
        padding: 0;
        background: #fff;
        backdrop-filter: none;
    }

    .report-shell {
        width: auto;
        height: auto;
        overflow: visible;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .report-scroll {
        overflow: visible;
        background: #fff;
    }

    .report-article {
        width: auto;
        margin: 0;
        padding: 0;
        font-size: 10.5pt;
        line-height: 1.75;
    }

    .report-article h1 { font-size: 24pt; }
    .report-action-card {
        break-inside: avoid;
        box-shadow: none;
    }
    .report-full-details > summary {
        display: none;
    }
    .report-article h2 {
        break-after: avoid;
        margin-top: 28pt;
        font-size: 16pt;
    }
    .report-article h3 {
        break-after: avoid;
        font-size: 12pt;
    }
    .report-article blockquote,
    .report-article li {
        break-inside: avoid;
    }
}

@media (prefers-reduced-motion: reduce) {
    .message.coach.streaming .bubble::after { animation: none; }
}
