:root { color-scheme: light; font-family: "Microsoft YaHei", system-ui, sans-serif; background: #edf3f5; color: #14242d; }
* { box-sizing: border-box; }
html, body { width: 100%; max-width: 100%; }
main, section, article, details, form, fieldset, header, footer,
.auth-panel, .ask-card, .document-panel, .admin-page, .admin-section,
.admin-section-content { min-width: 0; max-width: 100%; }
/* Some mobile browsers let `form { display: grid }` override the HTML hidden
   attribute. This must win so non-authorized and first-run panels stay hidden. */
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; }
.shell { max-width: 700px; min-width: 0; margin: 0 auto; padding: 28px 18px calc(28px + env(safe-area-inset-bottom)); overflow-x: hidden; }
header { padding: 10px 2px 18px; }
.eyebrow { margin: 0 0 7px; color: #0b6d74; font-size: .82rem; font-weight: 700; letter-spacing: .06em; }
h1 { margin: 0; font-size: clamp(1.7rem, 7vw, 2.35rem); letter-spacing: -.04em; }
h2 { margin: 28px 0 12px; font-size: 1.1rem; }
.subtle, footer { color: #61717a; font-size: .88rem; line-height: 1.55; }
.notice { display: grid; gap: 5px; padding: 14px 16px; border-left: 4px solid #0b8a81; border-radius: 8px; background: #e1f3ed; color: #1a4b47; font-size: .9rem; line-height: 1.5; }
.quick-questions { display: flex; min-width: 0; max-width: 100%; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; padding: 18px 0 8px; }
.quick-questions button { flex: 0 0 auto; white-space: nowrap; border: 1px solid #bfd0d5; background: #fff; color: #25505a; border-radius: 999px; padding: 8px 12px; }
.fault-card-panel { display: grid; gap: .25rem; margin: .4rem 0 .8rem; padding: .75rem; border: 1px solid #f0d2a5; border-radius: 12px; background: #fffaf0; color: #6f5123; }
.fault-card-panel span { font-size: .82rem; line-height: 1.45; }
.fault-card-panel .quick-questions { padding: .35rem 0; }
form { display: grid; gap: 9px; width: 100%; margin-top: 12px; }
label { font-weight: 700; }
textarea, input, select, button { min-width: 0; max-width: 100%; }
textarea, input, select { width: 100%; border: 1px solid #b9c8ce; border-radius: 12px; padding: 13px; font: inherit; background: #fff; }
textarea { min-height: 112px; resize: vertical; }
button[type="submit"] { min-height: 48px; border: 0; border-radius: 12px; background: #0e5666; color: #fff; font: inherit; font-weight: 700; }
button:disabled { opacity: .58; }
.loading { color: #0e5666; font-weight: 700; }
.app-update-banner { position: sticky; top: 8px; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: .65rem; margin: 0 0 .7rem; padding: .65rem .75rem; border: 1px solid #93c6bd; border-radius: 12px; background: #e8f8f4; color: #175c58; box-shadow: 0 8px 22px #17313c1c; font-size: .82rem; line-height: 1.4; }
.app-update-banner button { flex: 0 0 auto; min-height: 36px; border: 0; border-radius: 9px; background: #0e6665; color: #fff; padding: .35rem .65rem; font: inherit; font-weight: 800; }
.error { padding: 12px; border-radius: 10px; background: #ffe9e6; color: #a42d1e; }
.answer { white-space: pre-wrap; padding: 16px; border-radius: 14px; background: #fff; box-shadow: 0 2px 16px #17313c10; line-height: 1.7; overflow-wrap: anywhere; }
.evidence { display: grid; gap: 10px; }
.evidence details { background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 2px 16px #17313c0c; }
.evidence summary { cursor: pointer; color: #0b5660; font-weight: 700; }
.evidence p { color: #53646d; font-size: .9rem; line-height: 1.6; }
footer { margin-top: 36px; border-top: 1px solid #d3dfe2; padding-top: 18px; }
.document-panel { margin-top: 24px; padding: 14px; border-radius: 12px; background: #fff; }
.document-panel summary { cursor: pointer; color: #0b5660; font-weight: 700; }
.document-panel p { color: #61717a; font-size: .88rem; line-height: 1.55; }
@media (min-width: 720px) { .shell { padding-top: 48px; } }
.document-list { margin: .4rem 0 0; padding-left: 1.2rem; color: #45606a; font-size: .9rem; }
.document-list li { margin: .35rem 0; overflow-wrap: anywhere; }
.document-actions { display: inline-flex; flex-wrap: wrap; max-width: 100%; gap: .35rem; margin-left: .5rem; }
.document-actions button { border: 1px solid #9ab5bd; border-radius: 7px; background: #fff; color: #0e5666; padding: .18rem .45rem; }
.admin-setup { display: grid; gap: .55rem; margin: .8rem 0; padding: .85rem; border: 1px solid #b7d5cd; border-radius: 10px; background: #edf8f4; color: #23534f; }
.admin-setup span { font-size: .86rem; line-height: 1.5; }
.admin-setup button { min-height: 42px; border: 0; border-radius: 9px; background: #0e5666; color: #fff; font: inherit; font-weight: 700; }
.admin-create { display: grid; gap: .55rem; margin: .9rem 0; padding: .85rem; border: 1px solid #c9d9de; border-radius: 10px; background: #f6fafb; color: #25505a; }
.admin-create span, .consent { font-size: .86rem; line-height: 1.5; }
.consent input { width: auto; margin-right: .35rem; }
.backup-status { display: inline-block; margin: .45rem 0 0; padding: .24rem .55rem; border-radius: 999px; font-size: .8rem; }
.backup-status.fresh { background: #e1f3ed; color: #1a675f; }
.backup-status.stale, .backup-status.not_found { background: #fff0df; color: #995d14; }
.consent-status { margin: .45rem 0 0; color: #9b5a13; font-size: .86rem; line-height: 1.45; }
.index-status { display: inline-block; margin: .45rem 0 0; padding: .24rem .55rem; border-radius: 999px; background: #e7f3f4; color: #0e5666; font-size: .8rem; line-height: 1.45; }
.index-status.ready { background: #e1f3ed; color: #1a675f; }
.index-status.failed { color: #a73d32; }
.header-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.operational-alerts { display: grid; gap: .45rem; margin: .7rem 0 0; }
.operational-alert { margin: 0; padding: .55rem .7rem; border-radius: 9px; background: #fff0df; color: #8a5415; font-size: .84rem; line-height: 1.45; }
.operational-alert.critical { background: #ffe8e5; color: #9c3227; font-weight: 700; }
.auth-panel { background: #fff; border-radius: 18px; padding: 1rem; box-shadow: 0 4px 18px rgba(14, 36, 51, .08); }
.auth-panel h2 { margin: .25rem 0 .8rem; }
.auth-panel form + form { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid #d8e2e4; }
.feedback { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .75rem 0 0; color: #496069; font-size: .9rem; }
.feedback button { border: 1px solid #9ab5bd; border-radius: 999px; background: #fff; color: #0e5666; padding: .35rem .65rem; font: inherit; }
.feedback small { width: 100%; color: #61717a; }
.secondary-action { min-height: 40px; border: 1px solid #9ab5bd; border-radius: 9px; background: #fff; color: #0e5666; font: inherit; font-weight: 700; }
.admin-overview { margin: .5rem 0; padding: .7rem; border-radius: 9px; background: #eef4f6; color: #3b5058; white-space: pre-wrap; overflow-wrap: anywhere; font: .8rem/1.55 ui-monospace, Consolas, monospace; }
.consent-management { display: grid; gap: .55rem; margin: .85rem 0; padding: .8rem; border: 1px solid #ead4a4; border-radius: 10px; background: #fffaf0; color: #67501e; }
.install-app { margin-top: .7rem; min-height: 38px; border: 1px solid #0e5666; border-radius: 999px; background: #fff; color: #0e5666; padding: .25rem .75rem; font: inherit; font-weight: 700; }
.install-hint { margin: .55rem 0 0; color: #61717a; font-size: .82rem; line-height: 1.45; }
.voice-input { justify-self: start; border: 1px solid #9ab5bd; border-radius: 999px; background: #fff; color: #0e5666; padding: .4rem .75rem; font: inherit; }
.voice-input.is-listening { border-color: #a64036; background: #a64036; color: #fff; box-shadow: 0 0 0 5px rgba(166, 64, 54, .13); animation: voice-pulse 1.25s ease-in-out infinite; }
@keyframes voice-pulse {
  50% { box-shadow: 0 0 0 9px rgba(166, 64, 54, .05); }
}
.voice-hint { margin: -.15rem 0 .2rem; color: #697980; font-size: .8rem; line-height: 1.45; }
.source-link { display: inline-block; margin-top: .25rem; color: #0b6d74; font-size: .86rem; font-weight: 700; text-decoration: none; }
.visual-evidence-link { margin-left: .7rem; }
.visual-review-note { margin: .55rem 0 .1rem !important; padding: .5rem .65rem; border-left: 3px solid #d89b3c; border-radius: 8px; background: #fff8e9; color: #765522 !important; overflow-wrap: anywhere; }
#answer-meta { white-space: pre-line; }
.visual-review-panel { margin: .8rem 0; padding: .85rem; border: 1px solid #b9d8d3; border-radius: 14px; background: #f2faf8; color: #244e4d; }
.visual-review-panel > header { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: 0; }
.visual-review-panel > p { margin: .55rem 0; font-size: .88rem; line-height: 1.55; }
.visual-review-badge { flex: 0 0 auto; padding: .22rem .55rem; border-radius: 999px; background: #dcefeb; color: #17625f; font-size: .76rem; font-weight: 800; }
.visual-review-badge.high { background: #ffe5e1; color: #9c3227; }
.visual-review-badge.medium { background: #fff0d6; color: #895610; }
.visual-evidence-gallery { display: flex; gap: .65rem; overflow-x: auto; overscroll-behavior-x: contain; padding: .35rem 0 .55rem; }
.visual-evidence-card { flex: 0 0 156px; overflow: hidden; border: 1px solid #bfd7d5; border-radius: 11px; background: #fff; color: #155e62; text-decoration: none; }
.visual-image-frame { position: relative; height: 178px; overflow: hidden; background: #e8efef; }
.visual-evidence-card img { display: block; width: 100%; height: 100%; object-fit: fill; background: #e8efef; }
.visual-page-region { position: absolute; z-index: 2; box-sizing: border-box; border: 2px solid #f04c3e; border-radius: 4px; background: rgba(240, 76, 62, .16); box-shadow: 0 0 0 2px rgba(255, 255, 255, .8); pointer-events: none; }
.visual-evidence-card span { display: block; padding: .45rem .55rem; font-size: .78rem; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.visual-structured-details { margin-top: .4rem; border-top: 1px solid #cfe0de; padding-top: .6rem; }
.visual-structured-details summary { cursor: pointer; color: #0b6668; font-size: .86rem; font-weight: 800; }
#visual-structured-result { display: grid; gap: .55rem; margin-top: .6rem; }
.visual-structured-group { padding: .55rem .65rem; border-radius: 9px; background: #fff; }
.visual-structured-group strong { display: block; margin-bottom: .3rem; color: #214e50; font-size: .82rem; }
.visual-structured-group ul { margin: 0; padding-left: 1.1rem; color: #4a6264; font-size: .8rem; line-height: 1.5; }
.visual-region-locate { display: inline-flex; margin: .25rem 0 .1rem .35rem; border: 1px solid #8bbfbb; border-radius: 999px; padding: .12rem .45rem; background: #eef9f7; color: #0b6668; font: inherit; font-weight: 700; cursor: pointer; }

/* Member mobile UI V1: the operational functions stay unchanged, while the
   day-to-day question flow is presented as a clear, app-like workspace. */
body { background: radial-gradient(circle at 16% -4%, #d9f4ee 0, transparent 29rem), #f1f5f7; }
.shell { padding-bottom: calc(94px + env(safe-area-inset-bottom)); }
.app-header { position: relative; padding: 15px 2px 14px; }
.brand-line { display: flex; align-items: center; gap: 11px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: linear-gradient(145deg, #087b79, #164f66); color: #fff; font: 900 1.22rem/1 Arial, sans-serif; box-shadow: 0 7px 18px #0b56662b; }
.app-header .eyebrow { display: none; }
.app-header h1 { font-size: clamp(1.42rem, 6vw, 2.05rem); line-height: 1.18; }
.workspace-title { margin: 2px 0 0; color: #3f6971; font-size: .8rem; font-weight: 700; line-height: 1.35; }
.app-header #source { margin: 12px 0 0 1px; }
#current-user { display: inline-flex; margin: 10px 0 0; padding: 5px 9px; border-radius: 999px; background: #e7f4f2; color: #17625f; font-size: .78rem; }
.member-hero { display: grid; gap: 5px; margin: 4px 0 15px; padding: 17px 18px; border-radius: 18px; background: linear-gradient(135deg, #123d52, #087a76); color: #f3fffe; box-shadow: 0 12px 28px #0b566626; }
.member-hero p { margin: 0; color: #a8e1d8; font-size: .78rem; font-weight: 800; letter-spacing: .08em; }
.member-hero h2 { margin: 0; color: #fff; font-size: 1.3rem; }
.member-hero span { color: #d4f1ec; font-size: .88rem; line-height: 1.55; }
.notice { margin-bottom: 14px; border-left-width: 5px; border-radius: 14px; box-shadow: 0 7px 16px #0b56610d; }
.ask-card { margin-top: 0; padding: 16px; border: 1px solid #d7e5e5; border-radius: 18px; background: #fff; box-shadow: 0 10px 28px #17313c10; }
.view-heading { margin: 0 0 3px; color: #163d49; font-size: 1.15rem; }
.view-description { margin: 0 0 8px; color: #718087; font-size: .84rem; line-height: 1.5; }
.knowledge-picker { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: .42rem .6rem; margin: .4rem 0 .65rem; padding: .75rem; border: 1px solid #d6e6e5; border-radius: 14px; background: #f7fbfb; }
.knowledge-picker label { color: #537178; font-size: .75rem; font-weight: 700; }
.knowledge-picker select { min-height: 46px; padding: .68rem .72rem; border-color: #b8cdcf; background: #fff; font-size: .9rem; }
.knowledge-search-panel { grid-column: 1 / -1; padding-top: .15rem; }
.knowledge-search-panel summary { color: #176a68; cursor: pointer; font-size: .78rem; font-weight: 700; list-style: none; }
.knowledge-search-panel summary::-webkit-details-marker { display: none; }
.knowledge-search-panel summary::before { content: "⌕"; margin-right: .3rem; }
.knowledge-search-panel input { margin-top: .5rem !important; }
.selected-kb-card { display: grid; gap: .18rem; margin: 0 0 .45rem; padding: .72rem .78rem; border-left: 4px solid #0a817a; border-radius: 10px; background: linear-gradient(135deg, #e9f8f4, #f7fbfb); }
.selected-kb-card > span { color: #527579; font-size: .72rem; }
.selected-kb-card > strong { color: #0b6564; font-size: .94rem; overflow-wrap: anywhere; }
.ask-card #source { margin: 0; color: #718087; font-size: .78rem; line-height: 1.45; }
.ask-card label { color: #173d48; }
.ask-card #knowledge-search { margin-top: -2px; border-radius: 10px; background: #f7fafb; font-size: .9rem; }
.ask-card #knowledge-base { color: #153f49; font-weight: 700; }
.published-materials { display: grid; gap: .42rem; margin: .15rem 0 .4rem; padding: .68rem .8rem; border: 1px solid #c8dfdc; border-radius: 12px; background: #f1faf8; color: #285f5a; }
.published-materials summary { cursor: pointer; color: #0b6d69; font-size: .82rem; font-weight: 800; list-style: none; }
.published-materials summary::-webkit-details-marker { display: none; }
.published-materials summary::after { content: "＋"; float: right; font-size: 1rem; font-weight: 400; }
.published-materials[open] summary::after { content: "－"; }
.published-materials > span { color: #587579; font-size: .78rem; line-height: 1.45; }
.published-materials ul { display: grid; gap: .32rem; margin: 0; padding-left: 1.15rem; }
.published-materials li { color: #365e63; font-size: .8rem; line-height: 1.42; overflow-wrap: anywhere; }
.ask-card textarea { min-height: 142px; border-color: #b6c8ce; }
.ask-card button[type="submit"] { margin-top: 3px; min-height: 54px; border-radius: 14px; background: linear-gradient(120deg, #096d75, #14566d); box-shadow: 0 8px 18px #0e566633; font-size: 1.05rem; }
.quick-questions { padding-top: 13px; }
.quick-questions button { box-shadow: 0 2px 8px #17313c0d; }
.recent-questions { min-width: 0; overflow: hidden; }
.recent-questions #recent-questions { display: grid; gap: .45rem; max-width: 100%; overflow: hidden; padding: .6rem 0; }
.recent-questions #recent-questions button { width: 100%; min-width: 0; padding: .58rem .7rem; border-radius: 10px; text-align: left; white-space: normal; overflow-wrap: anywhere; line-height: 1.42; }
.document-panel { border: 1px solid #dce8e9; border-radius: 18px; box-shadow: 0 8px 22px #17313c0b; }
.document-panel summary { display: flex; align-items: center; min-height: 32px; }
.document-panel[open] summary { margin-bottom: 10px; }
.materials-overview { display: grid; gap: .22rem; margin: .25rem 0 .75rem; padding: .85rem .9rem; border: 1px solid #cce3de; border-radius: 13px; background: #eff9f6; color: #2a615d; }
.materials-overview strong { color: #096f69; }
.materials-overview span { font-size: .84rem; line-height: 1.48; }
.materials-status-summary { display: flex; flex-wrap: wrap; gap: .38rem; margin-top: .35rem; }
.materials-status-summary span { padding: .28rem .52rem; border: 1px solid #bee0d8; border-radius: 999px; background: #fff; color: #17645e; font-size: .76rem; font-weight: 700; }
.material-section { margin: .65rem 0; border: 1px solid #dce8e9; border-radius: 14px; background: #fbfdfd; overflow: hidden; }
.material-section summary { position: relative; display: grid; gap: 3px; padding: 14px; color: #174a55; cursor: pointer; list-style: none; }
.material-section summary::-webkit-details-marker { display: none; }
.material-section summary::after { content: "＋"; position: absolute; right: 16px; top: 15px; color: #08736f; font-size: 1.15rem; font-weight: 400; }
.material-section[open] summary::after { content: "－"; }
.material-section summary span { padding-right: 28px; font-weight: 800; }
.material-section summary small { color: #72858a; font-size: .78rem; font-weight: 400; line-height: 1.4; }
.material-section-content { display: grid; gap: .65rem; padding: 0 14px 15px; border-top: 1px solid #e4eeee; }
.material-section-content form { margin-top: 0; }
.material-section-content .document-list { margin: 0; }
.document-list { list-style: none; padding-left: 0; }
.document-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; margin: 0 !important; padding: .78rem 0; border-bottom: 1px solid #e4eeee; color: #244a54; }
.document-item:last-child { border-bottom: 0; }
.document-item strong { overflow-wrap: anywhere; color: #1a404b; font-size: .88rem; }
.document-detail { min-width: 0; color: #71848a; font-size: .77rem; overflow-wrap: anywhere; }
.document-item small { grid-column: 1 / -1; color: #63787d; font-size: .75rem; line-height: 1.45; }
.document-state { align-self: start; padding: .18rem .42rem; border-radius: 999px; background: #eef3f4; color: #586e74; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.document-state.pending_review { background: #fff1da; color: #946017; }
.document-state.published { background: #e0f4eb; color: #146955; }
.document-state.rejected, .document-state.archived { background: #f1f3f4; color: #68777b; }
.document-item .document-actions { grid-column: 1 / -1; margin: .25rem 0 0; }
.document-empty { margin: 0 !important; padding: .82rem .7rem; border: 1px dashed #c6d8da; border-radius: 10px; background: #f7fbfb; color: #71848a; font-size: .82rem; line-height: 1.5; }
.review-tools { display: grid; gap: .45rem; padding: .85rem; border: 1px solid #c9e3dd; border-radius: 12px; background: #eff9f6; color: #285c5a; }
.review-tools span { font-size: .8rem; line-height: 1.48; }
.review-tools label { margin-top: .2rem; color: #174f55; font-size: .83rem; }
.action-result { display: flex; align-items: flex-start; justify-content: space-between; gap: .65rem; margin: .15rem 0 0 !important; padding: .7rem .8rem; border: 1px solid #c8dcdf; border-radius: 10px; background: #f3f8f9; color: #365c64 !important; overflow-wrap: anywhere; }
.action-result[data-tone="success"] { border-color: #b9dfd4; background: #e8f7f1; color: #176454 !important; }
.action-result[data-tone="error"] { border-color: #efc3bc; background: #fff0ed; color: #a23b2e !important; }
.action-result-inner { flex: 1 1 auto; min-width: 0; white-space: pre-wrap; }
.action-result-close { flex: 0 0 auto; width: 28px; min-height: 28px; border: 0; border-radius: 50%; background: #ffffffb8; color: currentColor; font: 700 1rem/1 sans-serif; }
.action-dialog { width: min(520px, calc(100% - 28px)); max-height: calc(100vh - 34px); padding: 0; border: 0; border-radius: 20px; background: #fff; color: #173d48; box-shadow: 0 26px 80px #0b263866; }
.action-dialog::backdrop { background: #102d3a99; backdrop-filter: blur(3px); }
.action-dialog form { gap: .75rem; margin: 0; padding: 20px; overflow-y: auto; }
.action-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 0 .45rem; border-bottom: 1px solid #e1ebec; }
.action-dialog header strong { font-size: 1.08rem; }
.action-dialog .dialog-close { width: 36px; min-height: 36px; border: 0; border-radius: 50%; background: #edf4f5; color: #315861; font-size: 1.35rem; }
.action-dialog footer { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .25rem 0 0; padding: .7rem 0 0; border-top: 1px solid #e1ebec; }
.action-dialog footer button { min-height: 46px; }
.action-dialog footer button[type="submit"] { border: 0; border-radius: 10px; background: #0e5666; color: #fff; font: inherit; font-weight: 700; }
.action-dialog footer button.danger-action { background: #a33f34; color: #fff; }
.danger-action { border-color: #d6a29c !important; color: #a33f34 !important; }
.document-view { display: inline-flex; align-items: center; justify-content: center; min-height: 31px; padding: .18rem .55rem; text-decoration: none; font-size: .82rem; }
.document-rejection-reason { grid-column: 1 / -1; margin: .2rem 0 0 !important; padding: .58rem .7rem; border-left: 3px solid #d18333; border-radius: 8px; background: #fff7e9; color: #80501e !important; font-size: .8rem !important; line-height: 1.5; overflow-wrap: anywhere; }
.document-quality { grid-column: 1 / -1; margin-top: .28rem; border: 1px solid #d6e4e4; border-radius: 10px; background: #f8fbfb; overflow: hidden; }
.document-quality summary { display: flex; align-items: center; gap: .5rem; min-width: 0; padding: .5rem .62rem; cursor: pointer; list-style: none; }
.document-quality summary::-webkit-details-marker { display: none; }
.document-quality summary::after { content: "+"; margin-left: auto; color: #477177; font-weight: 800; }
.document-quality[open] summary::after { content: "−"; }
.document-quality-badge { flex: 0 0 auto; padding: .15rem .42rem; border-radius: 999px; background: #def2e9; color: #176855; font-size: .71rem; font-weight: 800; }
.quality-review_required .document-quality-badge { background: #fff1d8; color: #8a5b18; }
.quality-ocr_required .document-quality-badge, .quality-failed .document-quality-badge { background: #fde8e3; color: #a44534; }
.quality-unknown .document-quality-badge { background: #e9eef0; color: #627479; }
.document-quality-compact { min-width: 0; color: #62777c; font-size: .73rem; overflow-wrap: anywhere; }
.document-quality-body { display: grid; gap: .55rem; padding: 0 .62rem .65rem; border-top: 1px solid #e3eeee; }
.document-quality-body p { margin: .55rem 0 0 !important; color: #48666d !important; font-size: .76rem !important; line-height: 1.5; }
.document-quality-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .38rem; margin: 0; }
.document-quality-metrics div { min-width: 0; padding: .42rem; border-radius: 8px; background: #eef6f5; text-align: center; }
.document-quality-metrics dt { color: #71858a; font-size: .66rem; }
.document-quality-metrics dd { margin: .1rem 0 0; color: #155e5b; font-size: .86rem; font-weight: 800; }
.document-quality-warnings { margin: 0; padding-left: 1.1rem; color: #805a28; font-size: .74rem; line-height: 1.5; }
.document-quality-pages { padding: .48rem .55rem; border-radius: 8px; background: #fff8ec; overflow-wrap: anywhere; }
.document-quality-body > button { justify-self: start; }
.review-reason { margin: .2rem 0 0; padding: .58rem .7rem; border-left: 3px solid #d18333; border-radius: 8px; background: #fff7e9; color: #80501e; font-size: .8rem; line-height: 1.5; overflow-wrap: anywhere; }
.onboarding-card { display: grid; gap: .8rem; margin: 0 0 14px; padding: 1rem; border: 1px solid #c9e4df; border-radius: 16px; background: linear-gradient(135deg, #f1fbf9, #fff); box-shadow: 0 8px 20px #17313c0b; }
.onboarding-card p { margin: 0; color: #08736f; font-size: .76rem; font-weight: 800; letter-spacing: .08em; }
.onboarding-card h2 { margin: .2rem 0 0; color: #1a414c; font-size: 1.05rem; }
.onboarding-card ol { display: grid; gap: .62rem; margin: 0; padding: 0; list-style: none; counter-reset: guide; }
.onboarding-card li { display: grid; grid-template-columns: 26px 1fr; column-gap: .55rem; align-items: start; counter-increment: guide; }
.onboarding-card li::before { content: counter(guide); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #d9f1ec; color: #08736f; font-size: .75rem; font-weight: 900; }
.onboarding-card li strong { color: #284c55; font-size: .84rem; }
.onboarding-card li span { grid-column: 2; color: #6d8085; font-size: .78rem; line-height: 1.45; }
.onboarding-card button { justify-self: start; border-radius: 999px; padding: .3rem .8rem; }
#result { margin-top: 18px; }
#result > h2 { margin: 18px 0 10px; font-size: 1.05rem; }
.answer { border: 1px solid #d8e7e6; border-radius: 16px; box-shadow: 0 10px 26px #17313c10; }
.evidence details { border: 1px solid #dce7e8; box-shadow: none; }
.header-actions { gap: .45rem; }
.header-actions .secondary-action, #logout, .install-app { border-radius: 999px; font-size: .82rem; }
.bottom-nav { position: fixed; z-index: 20; left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 7px; border: 1px solid #d5e3e5; border-radius: 18px; background: rgba(255, 255, 255, .94); box-shadow: 0 12px 28px #102b3830; backdrop-filter: blur(14px); }
.bottom-nav button { display: grid; place-items: center; gap: 2px; min-height: 50px; border: 0; border-radius: 12px; background: transparent; color: #668087; font: 700 .72rem/1 "Microsoft YaHei", system-ui, sans-serif; }
.bottom-nav button span { font-size: 1.1rem; line-height: 1; }
.bottom-nav button.is-active { background: #e3f3ef; color: #096d69; }
.app-splash { position: fixed; z-index: 100; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 28px; background: radial-gradient(circle at 50% 28%, #1f6874 0, #123a50 42%, #0b2638 100%); color: #fff; transition: opacity .28s ease, visibility .28s ease; }
.app-splash.is-ready { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-logo { display: grid; place-items: center; width: 76px; height: 76px; margin-bottom: 8px; border: 1px solid #8cdbcf88; border-radius: 25px; background: linear-gradient(145deg, #0e8d87, #15516b); box-shadow: 0 18px 42px #020f1a66; color: #fff; font-size: 2.15rem; font-weight: 900; }
.app-splash strong { font-size: 1.22rem; letter-spacing: .02em; }
.app-splash span { color: #b6ded9; font-size: .9rem; }
.app-splash.has-diagnostics { place-content: center; text-align: center; }
.splash-diagnostics { width: min(420px, calc(100vw - 48px)); margin-top: 12px; padding: 16px; border: 1px solid #9fd2cd66; border-radius: 16px; background: #071d2bbb; box-shadow: 0 18px 46px #020b1366; }
.splash-diagnostics p { margin: 0 0 7px; color: #eaf7f5; font-size: .9rem; line-height: 1.65; }
.splash-diagnostics small { color: #a9cfcb; }
.splash-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.splash-actions button { min-height: 44px; padding: 8px 10px; border: 1px solid #9bd6cf88; border-radius: 11px; background: #e7f7f4; color: #075d5a; font-weight: 800; }
.splash-actions button + button { background: transparent; color: #d9efec; }
.auth-panel { border: 1px solid #dbe8e9; padding: 22px 18px; }
.auth-panel .login-kicker { margin: 0 0 3px; color: #08736f; font-size: .78rem; font-weight: 800; letter-spacing: .08em; }
.auth-panel .login-description { margin: -.2rem 0 .8rem; color: #71828a; font-size: .88rem; line-height: 1.55; }
.auth-panel button[type="submit"] { margin-top: 5px; min-height: 52px; border-radius: 14px; background: linear-gradient(120deg, #096d75, #14566d); }
.about-app { display: grid; gap: .3rem; margin-top: 1rem; padding: .9rem; border: 1px solid #cfe5e1; border-radius: 12px; background: linear-gradient(135deg, #f0faf8, #f8fbfb); color: #24565a; }
.about-app strong { color: #076d69; }
.about-app p { margin: 0; color: #45646a; font-size: .84rem; line-height: 1.55; }
.about-app span { margin-top: .2rem; color: #6a8185; font-size: .77rem; }
body:not(.is-authenticated) .app-header { padding-top: 40px; padding-bottom: 20px; }
body:not(.is-authenticated) .brand-line { justify-content: center; text-align: left; }
body:not(.is-authenticated) .workspace-title { color: #668087; }
.profile-tools { display: grid; gap: .5rem; margin: .6rem 0 1rem; padding-bottom: .9rem; border-bottom: 1px solid #e2ecec; }
.profile-tools #logout { justify-self: start; margin-top: .1rem; border-color: #e2b9b2; color: #a13f35; }
.admin-page { display: grid; gap: .75rem; }
.admin-page-head { padding: .15rem 0 .05rem; }
.admin-review-hint { display: grid; width: 100%; gap: .2rem; padding: .85rem .9rem; border: 1px solid #cbe3de; border-radius: 12px; background: #eff9f6; color: #28615c; text-align: left; font: inherit; cursor: pointer; }
.admin-review-hint strong { color: #086d68; }
.admin-review-hint span { font-size: .84rem; line-height: 1.48; }
.admin-dashboard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.admin-dashboard article, .admin-dashboard-link { display: grid; gap: 2px; min-height: 92px; padding: .8rem; border: 1px solid #d4e6e3; border-radius: 13px; background: linear-gradient(145deg, #f5fbfa, #fff); text-align: left; font: inherit; }
.admin-dashboard-link { cursor: pointer; }
.admin-dashboard-link:active, .admin-review-hint:active { transform: translateY(1px); background: #e8f6f3; }
.admin-dashboard span { color: #5e797d; font-size: .76rem; }
.admin-dashboard strong { color: #086e69; font-size: 1.22rem; line-height: 1.2; }
.admin-dashboard small { color: #87999d; font-size: .72rem; }
.admin-section { border: 1px solid #dce8e9; border-radius: 14px; background: #fbfdfd; overflow: hidden; }
.admin-section summary { position: relative; display: grid; gap: 3px; padding: 14px; color: #174a55; cursor: pointer; list-style: none; }
.admin-section summary::-webkit-details-marker { display: none; }
.admin-section summary::after { content: "＋"; position: absolute; right: 16px; margin-top: 2px; color: #08736f; font-size: 1.15rem; font-weight: 400; }
.admin-section[open] summary::after { content: "－"; }
.admin-section summary span { padding-right: 28px; font-weight: 800; }
.admin-section summary small { color: #72858a; font-size: .78rem; font-weight: 400; line-height: 1.4; }
.admin-section-content { display: grid; gap: .65rem; padding: 0 14px 15px; border-top: 1px solid #e4eeee; }
.admin-section-content .admin-create { margin: .15rem 0; }
.admin-subsections { display: grid; gap: .55rem; padding-top: .65rem; }
.admin-subsection { border: 1px solid #d8e7e7; border-radius: 12px; background: #fff; overflow: hidden; }
.admin-subsection > summary { position: relative; display: grid; gap: 2px; padding: 12px 38px 12px 12px; color: #194a54; cursor: pointer; list-style: none; }
.admin-subsection > summary::-webkit-details-marker { display: none; }
.admin-subsection > summary::after { content: "＋"; position: absolute; top: 14px; right: 14px; color: #08736f; }
.admin-subsection[open] > summary::after { content: "－"; }
.admin-subsection > summary span { font-weight: 800; }
.admin-subsection > summary small { color: #778a8e; font-size: .75rem; line-height: 1.4; }
.admin-subsection-content { display: grid; gap: .6rem; padding: 0 12px 13px; border-top: 1px solid #e7efef; }
.admin-subsection-content form { margin-top: .7rem; }
.structure-selection-summary { display: grid; gap: .16rem; padding: .72rem .8rem; border: 1px solid #c4dfda; border-radius: 12px; background: linear-gradient(135deg, #e8f7f3, #f8fcfb); }
.structure-selection-summary span { color: #62807f; font-size: .72rem; }
.structure-selection-summary strong { color: #0a6e69; font-size: .93rem; overflow-wrap: anywhere; }
.structure-selection-summary small { color: #536e74; font-size: .78rem; line-height: 1.45; overflow-wrap: anywhere; }
#structure-management > .admin-subsection { margin: .05rem 0; }
#structure-management .danger-action { min-height: 42px; border: 1px solid #d6a29c; border-radius: 9px; background: #fff; font: inherit; font-weight: 700; }
.structure-object-picker { display: grid; grid-template-columns: minmax(0, 1fr); gap: .35rem; padding: .8rem; border: 1px solid #d6e6e3; border-radius: 12px; background: #fff; }
.structure-object-picker label { margin-top: .1rem; }
.document-transfer-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.document-transfer-actions button { min-width: 0; }
#structure-current-document { color: #08756f; font-weight: 650; overflow-wrap: anywhere; }
#structure-management hr { width: 100%; margin: .35rem 0; border: 0; border-top: 1px solid #d9e7e5; }
#upload-target-hint { margin: -.1rem 0 .25rem; padding: .55rem .65rem; border-radius: 9px; background: #eef8f6; color: #326761; }
.admin-output-panel { display: grid; gap: .55rem; padding: .75rem; border: 1px solid #cbdfe0; border-radius: 12px; background: #f7fbfb; }
.admin-output-panel > header { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: 0 0 .45rem; border-bottom: 1px solid #e1ebeb; }
.admin-output-panel > header .secondary-action { min-height: 32px; padding: .15rem .65rem; }
.admin-output-panel .admin-overview, .admin-output-panel .document-list { margin: 0; }
@media (min-width: 720px) {
  .shell { padding-bottom: 48px; }
  .bottom-nav { position: static; max-width: 440px; margin: 28px auto 0; }
}
@media (max-width: 719px) {
  #protected-content[data-active-view="ask"] [data-app-view]:not([data-app-view="ask"]),
  #protected-content[data-active-view="materials"] [data-app-view]:not([data-app-view="materials"]),
  #protected-content[data-active-view="profile"] [data-app-view]:not([data-app-view="profile"]),
  #protected-content[data-active-view="admin"] [data-app-view]:not([data-app-view="admin"]) { display: none !important; }
  #protected-content[data-active-view="materials"] #document-panel,
  #protected-content[data-active-view="profile"] .account-security { margin-top: 5px; }
  #protected-content[data-active-view="admin"] #document-panel { display: block !important; margin-top: 5px; }
  #protected-content[data-active-view="admin"] #document-panel > summary,
  #protected-content[data-active-view="admin"] #document-panel > p,
  #protected-content[data-active-view="admin"] #document-panel > form,
  #protected-content[data-active-view="admin"] #document-panel > .materials-overview,
  #protected-content[data-active-view="admin"] #document-panel > .material-section,
  #protected-content[data-active-view="admin"] #document-panel > #upload-result,
  #protected-content[data-active-view="admin"] #document-panel > #admin-setup,
  #protected-content[data-active-view="admin"] #document-panel > #document-list { display: none !important; }
  #protected-content[data-active-view="admin"] #admin-controls:not([hidden]) { display: grid !important; }
}
@media (max-width: 380px) {
  .shell { padding-right: 12px; padding-left: 12px; }
  .admin-dashboard { grid-template-columns: 1fr; }
  .knowledge-picker { grid-template-columns: 1fr; }
  .knowledge-search-panel { grid-column: 1; }
  .document-actions { display: flex; margin-left: 0; }
  .header-actions > * { flex: 1 1 auto; }
}
/* Standalone release information pages */
.legal-page { min-height: 100vh; background: #edf3f5; color: #12262d; }
.legal-shell { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 32px 0 64px; }
.legal-back { display: inline-block; margin-bottom: 24px; color: #006c70; font-weight: 700; text-decoration: none; }
.legal-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.legal-head h1, .legal-head p { margin: 0; }
.legal-head p { color: #65777c; }
.legal-shell > section { margin: 14px 0; padding: 20px; border: 1px solid #d6e1e3; border-radius: 18px; background: #fff; box-shadow: 0 10px 28px rgba(14, 36, 51, .06); }
.legal-shell h2 { margin: 0 0 10px; font-size: 1.05rem; color: #006c70; }
.legal-shell section p { margin: 8px 0 0; line-height: 1.8; }
.legal-links { display: flex; justify-content: center; gap: 18px; margin-top: 12px; }
.legal-links a { color: #006c70; font-weight: 700; }
.site-compliance-footer { margin: 34px 0 90px; padding: 18px 8px 0; text-align: center; }
.site-compliance-footer .legal-links { margin: 0 0 10px; }
.icp-link { color: #526971; font-size: .82rem; text-decoration: none; }
.icp-link:hover, .icp-link:focus-visible { color: #006c70; text-decoration: underline; }
@media (min-width: 720px) { .site-compliance-footer { margin-bottom: 0; } }
