: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;
  min-height: 44px;
  border: 1px solid #9ab5bd;
  border-radius: 999px;
  background: #fff;
  color: #0e5666;
  padding: .45rem .82rem;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.voice-input > span { color: #118578; font-size: .72em; }
.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; }
.voice-input.is-listening > span { color: #fff; }
.voice-input.is-processing { border-color: #168173; background: #e3f3ef; color: #075a55; }
@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; }
.knowledge-search-feedback { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .4rem; }
.knowledge-search-feedback small { color: #617675; font-size: .8rem; }
.knowledge-search-feedback button { flex-shrink: 0; width: auto; margin: 0; padding: .4rem .7rem; font-size: .8rem; }
@keyframes knowledge-search-autofill { from { opacity: .99; } to { opacity: 1; } }
#knowledge-search:-webkit-autofill { animation-name: knowledge-search-autofill; animation-duration: .01s; }
.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; }
.review-link-output { display: grid; gap: .45rem; padding: .75rem; border: 1px solid #bcded8; border-radius: 12px; background: linear-gradient(135deg, #ebf8f4, #f9fcfb); }
.review-link-output[hidden] { display: none; }
.review-link-output input { width: 100%; color: #0b5f5b; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .82rem; }
.review-link-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.review-link-actions button { min-width: 0; }
@media (max-width: 560px) {
  .review-link-actions { grid-template-columns: 1fr; }
}
.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="answer"] [data-app-view]:not([data-app-view="answer"]),
  #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; }
}

/* App UI V4 / V61.0: unified mobile design system. The rules below are
   deliberately presentation-only so existing IDs, permissions and APIs keep
   their established behaviour. */
:root {
  --ink-950: #102d37;
  --ink-800: #244852;
  --ink-600: #5c747a;
  --teal-700: #086764;
  --teal-600: #087b75;
  --teal-100: #dff3ee;
  --teal-50: #eff9f6;
  --surface: #ffffff;
  --surface-soft: #f7faf9;
  --line: #dce8e6;
  --shadow-card: 0 12px 32px rgba(22, 58, 66, .08);
  --shadow-float: 0 18px 44px rgba(15, 45, 55, .18);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #f4f8f8;
  color: var(--ink-950);
}
body {
  background:
    radial-gradient(circle at 8% -5%, rgba(85, 201, 180, .16), transparent 28rem),
    radial-gradient(circle at 100% 28%, rgba(79, 149, 176, .09), transparent 24rem),
    #f4f8f8;
  color: var(--ink-950);
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font-family: inherit; }
button { touch-action: manipulation; }
button:not(:disabled), summary { cursor: pointer; }
button, a, summary, input, select, textarea { outline: none; }
button:focus-visible, a:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(10, 132, 124, .24);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.shell { width: min(100%, 760px); max-width: 760px; padding: 0 18px calc(102px + env(safe-area-inset-bottom)); }
.app-header { position: sticky; z-index: 18; top: 0; margin: 0 -18px 12px; padding: max(11px, env(safe-area-inset-top)) 18px 11px; background: rgba(244, 248, 248, .88); border-bottom: 1px solid rgba(214, 230, 228, .68); backdrop-filter: blur(18px) saturate(150%); }
.brand-line { min-height: 46px; }
.brand-copy { min-width: 0; flex: 1 1 auto; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; background: linear-gradient(145deg, #0b8d82, #0d596b); box-shadow: 0 8px 20px rgba(8, 103, 100, .24); }
.app-header h1 { color: var(--ink-950); font-size: 1.28rem; letter-spacing: -.035em; }
.workspace-title { color: var(--ink-600); font-size: .76rem; }
.secure-status { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 4px; padding: 6px 8px; border: 1px solid #cce4df; border-radius: 999px; background: rgba(255,255,255,.72); color: var(--teal-700); font-size: .68rem; font-weight: 800; }
.secure-status svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.member-hero { position: relative; grid-template-columns: minmax(0, 1fr) 92px; align-items: center; min-height: 148px; margin: 2px 0 14px; padding: 22px 20px; overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 24px; background: linear-gradient(135deg, #0e3546 0%, #086b68 68%, #0a8377 100%); box-shadow: 0 16px 34px rgba(9, 72, 76, .2); }
.member-hero::before { content: ""; position: absolute; width: 170px; height: 170px; right: -72px; top: -98px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 28px rgba(255,255,255,.035), 0 0 0 58px rgba(255,255,255,.025); }
.hero-copy { position: relative; z-index: 1; display: grid; gap: 6px; min-width: 0; }
.member-hero p { display: flex; align-items: center; gap: 6px; color: #b9eee4; letter-spacing: .05em; }
.hero-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #79efd0; box-shadow: 0 0 0 4px rgba(121,239,208,.13); }
.member-hero h2 { font-size: clamp(1.25rem, 5.5vw, 1.55rem); letter-spacing: -.025em; }
.member-hero span { max-width: 30rem; font-size: .84rem; }
.hero-graphic { position: relative; z-index: 1; width: 88px; height: 88px; opacity: .72; fill: none; stroke: #baf1e5; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.notice { grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 4px 10px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid #cde5df; border-left: 1px solid #cde5df; border-radius: 15px; background: rgba(255,255,255,.76); box-shadow: none; }
.notice strong { color: var(--teal-700); font-size: .8rem; white-space: nowrap; }
.notice span { color: var(--ink-600); font-size: .76rem; line-height: 1.5; }

.ask-card, .document-panel { border: 1px solid rgba(211, 229, 226, .9); border-radius: 22px; background: rgba(255,255,255,.94); box-shadow: var(--shadow-card); }
.ask-card { padding: 18px; }
.view-heading { color: var(--ink-950); font-size: 1.17rem; letter-spacing: -.02em; }
.view-description { margin-bottom: 12px; }
.knowledge-picker { gap: 6px 10px; margin: 0 0 10px; padding: 12px; border-color: #d7e7e4; border-radius: 16px; background: var(--surface-soft); }
label { color: var(--ink-800); font-size: .84rem; }
textarea, input, select { min-height: 48px; border-color: #c8d8d9; border-radius: 13px; background: var(--surface); color: var(--ink-950); transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
textarea:hover, input:hover, select:hover { border-color: #9ebdbb; }
textarea:focus, input:focus, select:focus { border-color: var(--teal-600); box-shadow: 0 0 0 4px rgba(8,123,117,.1); }
.selected-kb-card { margin-bottom: 8px; padding: 12px 13px; border-left: 0; border: 1px solid #cce6df; border-radius: 14px; background: linear-gradient(135deg, #eaf8f4, #f7fbfa); }
.selected-kb-card > span::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #1b9c84; }
.quick-questions { gap: 9px; padding: 12px 1px 8px; scrollbar-width: none; }
.quick-questions::-webkit-scrollbar { display: none; }
.quick-questions button { min-height: 40px; padding: 8px 13px; border-color: #cbdedc; color: #315c60; box-shadow: none; font-size: .8rem; }
.quick-questions button:active { background: var(--teal-50); transform: translateY(1px); }
.composer-label { display: grid; gap: 3px; margin-top: 5px; }
.composer-label span { font-size: .9rem; }
.composer-label small { color: #7b8d91; font-size: .72rem; font-weight: 400; line-height: 1.45; }
.ask-card textarea { min-height: 132px; padding: 14px 15px; background: #fcfdfd; line-height: 1.6; }
.ask-card button[type="submit"], .auth-panel button[type="submit"] { border-radius: 15px; background: linear-gradient(125deg, #08766f, #0e5268); box-shadow: 0 10px 22px rgba(8,103,100,.23); transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
.ask-card button[type="submit"]:active, .auth-panel button[type="submit"]:active { transform: translateY(1px); box-shadow: 0 5px 12px rgba(8,103,100,.2); }
.secondary-action { min-height: 44px; border-color: #bfd2d2; border-radius: 11px; color: var(--teal-700); padding: 7px 11px; }

.page-summary { display: grid !important; grid-template-columns: 44px minmax(0,1fr); align-items: center !important; gap: 11px; min-height: 58px !important; padding: 1px; list-style: none; }
.page-summary::-webkit-details-marker { display: none; }
.page-summary::after { content: none !important; }
.page-summary-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--teal-50); color: var(--teal-700); }
.page-summary-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.page-summary > span:last-child { display: grid; gap: 2px; min-width: 0; }
.page-summary strong { color: var(--ink-950); font-size: 1.05rem; }
.page-summary small { color: var(--ink-600); font-size: .74rem; font-weight: 400; line-height: 1.4; }
.document-panel[open] > .page-summary { margin-bottom: 14px; padding-bottom: 13px; border-bottom: 1px solid #e5eeed; }
.account-security, #document-panel { margin-top: 2px; padding: 16px; }
.account-security > h2 { margin-top: 20px; color: var(--ink-950); }
.profile-tools { padding: 14px; border: 1px solid #dce9e7; border-radius: 16px; background: var(--surface-soft); }
.profile-tools .header-actions { display: grid; grid-template-columns: 1fr 1fr; }
.about-app { padding: 15px; border-radius: 16px; }
.materials-overview { padding: 14px; border-radius: 15px; }
.material-section, .admin-section { border-radius: 16px; background: #fcfefe; }
.material-section summary, .admin-section summary { min-height: 67px; padding: 14px 46px 14px 15px; }
.material-section summary::after, .admin-section summary::after { display: grid; place-items: center; width: 28px; height: 28px; right: 12px; top: 18px; margin: 0; border-radius: 9px; background: var(--teal-50); font-size: 1rem; }
.material-section-content, .admin-section-content { padding: 14px 15px 16px; }
.document-item { padding: 13px 2px; }
.document-actions button { min-height: 36px; padding: 5px 9px; border-radius: 9px; }

.admin-page-head { padding: 3px 2px; }
.admin-dashboard { gap: 9px; }
.admin-dashboard article, .admin-dashboard-link { min-height: 104px; padding: 14px; border-radius: 16px; background: linear-gradient(145deg, #f1faf7, #fff); }
.admin-dashboard strong { font-size: 1.35rem; }
.admin-review-hint { padding: 14px; border-radius: 15px; }
.admin-subsection { border-radius: 14px; }
.admin-subsection > summary { min-height: 61px; padding: 13px 42px 13px 13px; }
.structure-selection-summary, .structure-object-picker { border-radius: 15px; }

#result { margin: 16px 0 4px; padding: 17px; border: 1px solid #d7e7e4; border-radius: 22px; background: rgba(255,255,255,.94); box-shadow: var(--shadow-card); }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 13px; border-bottom: 1px solid #e3edeb; }
.result-heading div { display: grid; gap: 2px; }
.result-heading span { color: var(--teal-700); font-size: .72rem; font-weight: 800; }
.result-heading h2 { margin: 0 !important; color: var(--ink-950); font-size: 1.12rem; }
.evidence-ready { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: var(--teal-50); }
.evidence-ready i, .auth-assurances i { width: 6px; height: 6px; border-radius: 50%; background: #28a382; }
.answer { margin-top: 14px; padding: 3px 1px 10px; border: 0; border-radius: 0; box-shadow: none; color: #1b383f; font-size: .94rem; line-height: 1.82; }
#answer-meta { margin: 10px 0; padding: 10px 12px; border-radius: 11px; background: #f3f7f6; color: #657b80; font-size: .76rem; }
.feedback { padding: 12px; border-radius: 13px; background: var(--surface-soft); }
.evidence-heading { display: flex; align-items: center; gap: 6px; margin: 22px 0 10px !important; color: var(--ink-950); }
.evidence-heading span { color: var(--teal-600); }
.evidence details { padding: 13px 14px; border-radius: 14px; background: #fafcfc; }
.loading { margin: 14px 2px; padding: 13px 15px; border: 1px solid #cde5df; border-radius: 14px; background: var(--teal-50); }

.bottom-nav { z-index: 40; left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); gap: 3px; padding: 7px; border-color: rgba(208,226,224,.88); border-radius: 22px; background: rgba(255,255,255,.9); box-shadow: var(--shadow-float); backdrop-filter: blur(22px) saturate(165%); }
.bottom-nav button { position: relative; display: flex; flex-direction: column; gap: 3px; min-height: 56px; border-radius: 16px; color: #71878b; transition: color .18s ease, background .18s ease, transform .16s ease; }
.bottom-nav button:active { transform: scale(.97); }
.bottom-nav button.is-active { background: linear-gradient(145deg, #e1f3ee, #edf8f5); color: var(--teal-700); }
.nav-icon { display: grid; place-items: center; width: 24px; height: 24px; font-size: 0 !important; }
.nav-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-label { font-size: .69rem !important; line-height: 1; }

body:not(.is-authenticated) .app-header { position: static; margin: 0; padding: 36px 0 16px; border: 0; background: transparent; backdrop-filter: none; }
body:not(.is-authenticated) .secure-status { display: none; }
.auth-panel { position: relative; overflow: hidden; padding: 24px 20px 20px; border-radius: 24px; box-shadow: 0 20px 55px rgba(17,56,64,.12); }
.auth-panel::before { content: ""; position: absolute; width: 180px; height: 180px; right: -110px; top: -108px; border-radius: 50%; background: rgba(31,167,147,.1); box-shadow: 0 0 0 28px rgba(31,167,147,.035); }
.auth-emblem { position: relative; display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 16px; border-radius: 17px; background: linear-gradient(145deg, #0a8b80, #0d556b); box-shadow: 0 11px 24px rgba(8,103,100,.22); color: white; font-size: 1.45rem; font-weight: 900; }
.auth-emblem i { position: absolute; width: 10px; height: 10px; right: -2px; bottom: 2px; border: 3px solid white; border-radius: 50%; background: #38bb8b; }
.auth-panel h2 { position: relative; color: var(--ink-950); font-size: 1.42rem; letter-spacing: -.025em; }
.auth-panel form { position: relative; gap: 10px; }
.auth-assurances { display: flex; justify-content: center; gap: 16px; margin-top: 17px; color: #698085; font-size: .72rem; }
.auth-assurances span { display: inline-flex; align-items: center; gap: 5px; }

@media (min-width: 720px) {
  .shell { padding-top: 0; padding-bottom: 44px; }
  .app-header { border-radius: 0 0 18px 18px; }
  .bottom-nav { position: sticky; bottom: 18px; max-width: 490px; margin: 30px auto 0; }
  .ask-card, #result { padding: 22px; }
  .member-hero { min-height: 166px; padding: 28px; }
  .auth-panel { max-width: 520px; margin: 0 auto; padding: 30px; }
}
@media (max-width: 480px) {
  .shell { padding-right: 14px; padding-left: 14px; }
  .app-header { margin-right: -14px; margin-left: -14px; padding-right: 14px; padding-left: 14px; }
  .secure-status { padding: 6px; font-size: 0; }
  .secure-status svg { width: 16px; height: 16px; }
  .member-hero { grid-template-columns: minmax(0,1fr) 72px; padding: 19px 17px; border-radius: 21px; }
  .hero-graphic { width: 70px; height: 70px; }
  .notice { grid-template-columns: 1fr; gap: 2px; }
  .ask-card { padding: 15px; }
  .profile-tools .header-actions { grid-template-columns: 1fr; }
  #result { padding: 15px; }
  .result-heading { align-items: flex-start; }
  .evidence-ready { padding: 5px 7px; font-size: .65rem !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Industrial App UI V5 / V61.1
   The selected high-fidelity direction changes information hierarchy while
   retaining every existing ID, permission gate and API binding. */
:root {
  --app-bg: #eef3f1;
  --app-surface: #ffffff;
  --app-surface-soft: #f4f8f6;
  --app-brand: #0b655b;
  --app-brand-deep: #073e39;
  --app-brand-soft: #e2f1ec;
  --app-text: #122724;
  --app-muted: #647773;
  --app-border: #d7e3df;
  --app-warning: #a95c1a;
  --app-warning-soft: #fff1df;
  --app-danger: #a64439;
  --app-success: #1f7b59;
  --app-radius-lg: 22px;
  --app-radius-md: 16px;
  --app-shadow: 0 12px 34px rgba(16, 52, 46, .08);
}
body { background: var(--app-bg); }
.shell { width: min(100%, 800px); }
.app-header { margin-bottom: 14px; background: rgba(238, 243, 241, .92); }
.brand-mark { background: var(--app-brand); box-shadow: none; }
.secure-status { border-color: var(--app-border); background: var(--app-surface); color: var(--app-brand); }

.notice {
  margin: 12px 0 0;
  padding: 10px 13px;
  border: 0;
  border-left: 4px solid #d79349;
  border-radius: 5px 13px 13px 5px;
  background: var(--app-warning-soft);
}
.notice strong { color: var(--app-warning); }

.ask-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.ask-card > .knowledge-picker { order: 0; }
.ask-card > .question-hero { order: 1; }
.ask-card > #consent-status { order: 3; }
.ask-card > #index-status { order: 4; }
.ask-card > #published-materials { order: 5; }
.ask-card > .quick-questions { order: 6; }
.ask-card > #fault-card-panel { order: 7; }
.ask-card > #recent-questions-panel { order: 8; }
.knowledge-picker {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.knowledge-picker > summary { list-style: none; }
.knowledge-picker > summary::-webkit-details-marker { display: none; }
.knowledge-picker[open] > .selected-kb-card { border-radius: 15px 15px 6px 6px; }
.knowledge-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px 10px;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 6px 6px 15px 15px;
  background: var(--app-surface);
}
.knowledge-fields label { margin: 0 2px; }
.knowledge-fields select { min-width: 0; }
.knowledge-search-panel { grid-column: 1 / -1; }
.selected-kb-card {
  position: relative;
  margin: 0;
  padding: 12px 38px 12px 40px;
  border: 0;
  border-radius: 15px;
  background: var(--app-surface);
  box-shadow: 0 4px 15px rgba(16, 52, 46, .05);
}
.selected-kb-card:focus-visible { outline: 3px solid rgba(11,101,91,.22); outline-offset: 2px; }
.selected-kb-card::after {
  content: "切换";
  position: absolute;
  right: 13px;
  top: 14px;
  color: var(--app-brand);
  font-size: .7rem;
  font-weight: 800;
}
.selected-kb-card::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 17px;
  width: 10px;
  height: 10px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--app-success);
  box-shadow: 0 0 0 2px rgba(31, 123, 89, .14);
}
.selected-kb-card > span::before { display: none; }
.question-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 15px;
  overflow: hidden;
  padding: 20px;
  border-radius: var(--app-radius-lg);
  background: var(--app-brand-deep);
  color: #fff;
  box-shadow: var(--app-shadow);
}
.question-hero::after {
  content: "";
  position: absolute;
  right: -62px;
  top: -92px;
  width: 168px;
  height: 168px;
  border: 28px solid rgba(255,255,255,.055);
  border-radius: 50%;
}
.question-hero-copy { position: relative; z-index: 1; display: grid; gap: 6px; }
.question-hero-copy p { display: flex; align-items: center; gap: 7px; color: #aee5d8; font-size: .72rem; font-weight: 800; letter-spacing: .035em; }
.question-hero-copy h2 { margin: 0; max-width: 19rem; color: #fff; font-size: clamp(1.28rem, 5.2vw, 1.65rem); letter-spacing: -.025em; }
.question-hero-copy > span { max-width: 29rem; color: #c9deda; font-size: .82rem; line-height: 1.6; }
.question-hero > .hero-graphic { position: relative; z-index: 1; align-self: center; width: 76px; height: 76px; opacity: .42; }
.question-box {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 13px;
  border-radius: 17px;
  background: var(--app-surface);
  color: var(--app-text);
}
.question-box .composer-label { margin: 0; }
.composer-label span { color: var(--app-text); font-size: .93rem; }
.question-box textarea {
  min-height: 92px;
  padding: 10px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  resize: vertical;
}
.question-box textarea:focus { box-shadow: none; }
.question-box button[type="submit"] {
  display: grid;
  gap: 2px;
  min-height: 58px;
  margin-top: 8px;
  border-radius: 14px;
  background: var(--app-brand);
  box-shadow: none;
}
.question-box button[type="submit"] span { font-size: 1rem; font-weight: 800; }
.question-box button[type="submit"] small { color: #cce9e2; font-size: .68rem; font-weight: 400; }
.quick-questions { padding-top: 14px; }
.quick-questions::before {
  content: "现场常问";
  align-self: center;
  flex: 0 0 auto;
  margin-right: 2px;
  color: var(--app-muted);
  font-size: .72rem;
  font-weight: 800;
}
.fault-card-panel .quick-questions::before,
.recent-questions .quick-questions::before { content: none; }

.account-security, #document-panel {
  padding: 17px;
  border-color: var(--app-border);
  border-radius: var(--app-radius-lg);
  box-shadow: var(--app-shadow);
}
.document-panel[open] > .page-summary { border-bottom-color: var(--app-border); }
.page-summary-icon { color: var(--app-brand); background: var(--app-brand-soft); }
.profile-identity-card {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--app-border);
  border-radius: 18px;
  background: var(--app-surface);
}
.profile-identity-card::after {
  content: "";
  position: absolute;
  width: 112px;
  height: 112px;
  right: -54px;
  top: -60px;
  border-radius: 50%;
  background: var(--app-brand-soft);
}
.profile-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #fff;
  background: var(--app-brand);
  border-radius: 16px;
  font-size: 1.15rem;
  font-weight: 900;
}
.profile-identity-card > div { min-width: 0; }
.profile-identity-card small { color: var(--app-muted); }
.profile-identity-card #current-user { margin: 3px 0 0; color: var(--app-text); font-size: .93rem; font-weight: 800; }
.profile-session {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--app-brand-soft);
  color: var(--app-brand);
  font-size: .66rem;
  font-weight: 800;
}
.profile-session i, .admin-page-kicker i { width: 6px; height: 6px; border-radius: 50%; background: var(--app-success); }
.profile-tools { margin-top: 0; background: var(--app-surface-soft); }
.about-app { border-color: var(--app-border); background: var(--app-surface-soft); }

.materials-overview {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 0;
  border-radius: 18px;
  background: var(--app-brand-deep);
  color: #d7e9e4;
}
.materials-overview strong { color: #fff; font-size: 1rem; }
.materials-overview span { color: #c7dfd9; }
.material-section, .admin-section { border-color: var(--app-border); background: var(--app-surface); }
.material-section summary::after, .admin-section summary::after { color: var(--app-brand); background: var(--app-brand-soft); }
.document-list { display: grid; gap: 9px; }
.document-item {
  margin: 0;
  padding: 13px;
  border: 1px solid var(--app-border);
  border-radius: 15px;
  background: var(--app-surface);
}
.document-item::before {
  content: "PDF";
  float: left;
  margin: 0 10px 8px 0;
  padding: 8px 6px;
  border-radius: 8px;
  background: #f1ebe7;
  color: #994e3e;
  font-size: .62rem;
  font-weight: 900;
}

.admin-page-head { display: grid; gap: 3px; margin-bottom: 10px; }
.admin-page-kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--app-success); font-size: .72rem; font-weight: 800; }
.admin-dashboard { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.admin-dashboard article, .admin-dashboard-link {
  min-height: 92px;
  padding: 12px;
  border-color: var(--app-border);
  border-radius: 15px;
  background: var(--app-surface);
  box-shadow: none;
}
.admin-dashboard span { color: var(--app-muted); }
.admin-dashboard strong { color: var(--app-brand-deep); }
.admin-review-hint {
  border: 0;
  border-left: 4px solid var(--app-warning);
  border-radius: 6px 14px 14px 6px;
  background: var(--app-warning-soft);
}
.admin-review-hint strong { color: var(--app-warning); }
.admin-section > summary > span:first-child { color: var(--app-text); }

#result {
  padding: 18px;
  border-color: var(--app-border);
  border-radius: var(--app-radius-lg);
  box-shadow: var(--app-shadow);
}
.result-heading { border-bottom-color: var(--app-border); }
.result-heading > div::before {
  content: "分析完成";
  width: max-content;
  margin-bottom: 2px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--app-brand-soft);
  color: var(--app-success);
  font-size: .65rem;
  font-weight: 800;
}
#result[data-status="degraded"] .result-heading > div::before {
  content: "初步结论";
  background: var(--app-warning-soft);
  color: var(--app-warning);
}
#result[data-status="blocked"] .result-heading > div::before {
  content: "分析受阻";
  background: #fff0ee;
  color: var(--app-danger);
}
#result[data-status="degraded"] .evidence-ready i { background: var(--app-warning); }
#result[data-status="blocked"] .evidence-ready i { background: var(--app-danger); }
.answer {
  margin-top: 13px;
  padding: 15px;
  border: 1px solid var(--app-border);
  border-radius: 16px;
  background: var(--app-surface);
  line-height: 1.85;
}
.answer h2, .answer h3 {
  margin: 17px 0 8px;
  color: var(--app-brand-deep);
  font-size: 1rem;
}
.answer h2:first-child, .answer h3:first-child { margin-top: 0; }
.answer ol, .answer ul { padding-left: 1.25rem; }
.answer li { margin: 7px 0; }
.evidence-heading { color: var(--app-text); }
.evidence details { border: 1px solid var(--app-border); background: var(--app-surface-soft); }
.feedback { border: 1px solid var(--app-border); background: var(--app-surface-soft); }

.bottom-nav {
  padding: 8px;
  border-color: var(--app-border);
  background: rgba(255,255,255,.94);
  box-shadow: 0 12px 30px rgba(20, 51, 45, .16);
}
.bottom-nav button.is-active { color: var(--app-brand-deep); background: var(--app-brand-soft); }
.bottom-nav button.is-active::after {
  content: "";
  position: absolute;
  bottom: 5px;
  width: 15px;
  height: 3px;
  border-radius: 99px;
  background: var(--app-brand);
}

@media (max-width: 719px) {
  .admin-dashboard { grid-template-columns: repeat(2, minmax(0,1fr)); }
  #protected-content[data-active-view="ask"] .question-hero { display: grid !important; }
  #protected-content[data-active-view="ask"] .notice { display: grid !important; }
}
@media (max-width: 420px) {
  .question-hero { grid-template-columns: minmax(0,1fr) 58px; padding: 18px 16px 16px; }
  .question-hero > .hero-graphic { width: 58px; height: 58px; }
  .knowledge-fields { grid-template-columns: 1fr; }
  .knowledge-search-panel { grid-column: 1; }
  .profile-identity-card { grid-template-columns: 48px minmax(0,1fr); }
  .profile-avatar { width: 48px; height: 48px; }
  .profile-session { grid-column: 1 / -1; justify-self: start; }
  .document-item::before { padding: 7px 5px; }
}

/* Compact Industrial Workspace / V61.3
   Matches the approved single-layer mobile direction. */
:root {
  --workspace-bg: #f3f7f5;
  --workspace-ink: #102b28;
  --workspace-muted: #667a76;
  --workspace-green: #096b60;
  --workspace-deep: #063f39;
  --workspace-line: #d8e3df;
  --workspace-mint: #e5f1ed;
}
body { background: var(--workspace-bg); color: var(--workspace-ink); }
.shell { width: min(100%, 640px); padding-right: 16px; padding-left: 16px; }
.app-header {
  margin: 0 -16px 14px;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  border-bottom: 0;
  background: rgba(243,247,245,.96);
  box-shadow: none;
}
.brand-line { min-height: 48px; gap: 12px; }
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--workspace-green);
  box-shadow: none;
  font-size: 1.08rem;
}
.app-header h1 { color: var(--workspace-ink); font-size: 1.05rem; letter-spacing: -.02em; }
.workspace-title { margin-top: 3px; color: var(--workspace-muted); font-size: .76rem; font-weight: 500; }
.brand-copy { min-width: 0; flex: 1 1 auto; }
.header-search {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--workspace-line);
  border-radius: 14px;
  background: #fff;
  color: var(--workspace-ink);
}
.header-search svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.secure-status {
  width: 44px;
  height: 44px;
  justify-content: center;
  padding: 0;
  border-color: var(--workspace-line);
  border-radius: 14px;
  background: #fff;
  font-size: 0;
}
.secure-status svg { width: 19px; height: 19px; }

.ask-card { gap: 11px; }
.ask-card > .knowledge-picker { order: 0; }
.ask-card > .question-hero { order: 1; }
.ask-card > .analysis-shortcuts { order: 2; }
.ask-card > #consent-status { order: 3; }
.ask-card > #index-status { order: 4; }
.ask-card > #published-materials { order: 5; }
.ask-card > .quick-questions { order: 6; }
.ask-card > #fault-card-panel { order: 7; }
.ask-card > #recent-questions-panel { order: 8; }

.selected-kb-card {
  min-height: 58px;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 11px 42px 11px 40px;
  border: 0;
  border-radius: 16px;
  background: var(--workspace-mint);
  box-shadow: none;
}
.selected-kb-card::before { top: 23px; left: 14px; width: 9px; height: 9px; border-width: 3px; }
.selected-kb-card::after {
  content: "⌄";
  top: 50%;
  right: 16px;
  transform: translateY(-55%);
  color: var(--workspace-deep);
  font-size: 1.1rem;
  font-weight: 500;
}
.selected-kb-card > span, .selected-kb-card > p { display: none; }
.selected-kb-card > strong {
  overflow: hidden;
  color: #123c37;
  font-size: .92rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.knowledge-picker[open] > .selected-kb-card { border-radius: 16px 16px 8px 8px; }
.knowledge-fields { margin-top: 5px; border-radius: 8px 8px 16px 16px; box-shadow: none; }

.question-hero {
  grid-template-columns: minmax(0,1fr);
  gap: 14px;
  padding: 22px 18px 18px;
  border-radius: 26px;
  background: var(--workspace-deep);
  box-shadow: none;
}
.question-hero::after {
  right: -68px;
  top: -60px;
  width: 190px;
  height: 190px;
  border-width: 36px;
  border-color: rgba(255,255,255,.055);
}
.question-hero-copy { gap: 7px; padding: 0 7px; }
.question-hero-copy p { display: none; }
.question-hero-copy h2 {
  max-width: 22rem;
  color: #fff;
  font-size: clamp(1.28rem, 5.7vw, 1.62rem);
  line-height: 1.28;
  letter-spacing: -.035em;
}
.question-hero-copy > span { color: #c8ded9; font-size: .84rem; line-height: 1.55; }
.question-hero > .hero-graphic { display: none; }
.question-box {
  grid-column: auto;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 8px 10px;
  padding: 14px;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: none;
}
.question-box textarea {
  grid-column: 1 / -1;
  min-height: 96px;
  max-height: 220px;
  padding: 4px 5px;
  border: 0;
  background: transparent;
  color: var(--workspace-ink);
  font-size: .94rem;
  line-height: 1.62;
  resize: vertical;
}
.question-box textarea::placeholder { color: #5f706d; opacity: 1; }
.question-box .voice-input, .question-box .voice-hint { grid-column: 1 / -1; }
.composer-trust {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: center;
  color: #617773;
  font-size: .76rem;
  font-weight: 600;
}
.composer-trust svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #6e8580;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.question-box button[type="submit"] {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 106px;
  min-height: 48px;
  margin: 0;
  padding: 0 18px;
  border-radius: 15px;
  background: var(--workspace-green);
  box-shadow: none;
}
.question-box button[type="submit"]::before { content: "↑"; font-size: 1.05rem; font-weight: 400; }
.question-box button[type="submit"] span { font-size: .92rem; }
.question-box button[type="submit"] small { display: none; }

.analysis-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.analysis-shortcuts button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 52px;
  border: 1px solid var(--workspace-line);
  border-radius: 16px;
  background: #fff;
  color: #154d47;
  font: inherit;
  font-size: .86rem;
  font-weight: 700;
  line-height: 1;
}
.analysis-shortcuts button:active { background: var(--workspace-mint); transform: translateY(1px); }
.analysis-shortcuts svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.quick-questions { gap: 8px; padding: 7px 0 3px; }
.quick-questions::before {
  content: "现场常问";
  margin-right: 5px;
  color: var(--workspace-ink);
  font-size: .84rem;
}
.quick-questions button { min-height: 38px; border-color: var(--workspace-line); background: #fff; }

.bottom-nav {
  left: max(10px, env(safe-area-inset-left));
  right: max(10px, env(safe-area-inset-right));
  bottom: max(9px, env(safe-area-inset-bottom));
  padding: 7px;
  border-color: var(--workspace-line);
  border-radius: 24px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 28px rgba(23,54,48,.13);
}
.bottom-nav button { min-height: 57px; border-radius: 17px; color: #6c817d; }
.bottom-nav button.is-active { color: var(--workspace-green); background: var(--workspace-mint); }
.bottom-nav button.is-active::after { display: none; }

@media (max-width: 480px) {
  .shell { padding-right: 14px; padding-left: 14px; }
  .app-header { margin-right: -14px; margin-left: -14px; padding-right: 14px; padding-left: 14px; }
  .question-hero { grid-template-columns: minmax(0,1fr); padding: 20px 15px 15px; }
  .question-hero-copy { padding: 0 5px; }
  .question-box { padding: 13px; }
  .question-box button[type="submit"] { min-width: 100px; padding: 0 15px; }
  .header-search, .secure-status { width: 42px; height: 42px; border-radius: 13px; }
}

/* 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: 0 0 64px; }
.legal-topbar { position: sticky; z-index: 10; top: 0; display: grid; grid-template-columns: minmax(124px, auto) 1fr minmax(124px, auto); align-items: center; min-height: 64px; margin: 0 -16px 22px; padding: max(8px, env(safe-area-inset-top)) 16px 8px; border-bottom: 1px solid #d5e3e2; background: rgba(237, 243, 245, .94); backdrop-filter: blur(16px); }
.legal-topbar > strong { grid-column: 2; justify-self: center; color: #173e44; font-size: .96rem; }
.legal-back { display: inline-flex; grid-column: 1; grid-row: 1; align-items: center; justify-content: center; min-width: 124px; min-height: 48px; padding: 0 14px; border: 1px solid #bdd9d5; border-radius: 14px; background: #fff; color: #006c70; font-weight: 800; text-decoration: none; box-shadow: 0 5px 14px rgba(14, 66, 69, .08); }
.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; }
.filing-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 9px 18px; }
.police-beian-link { display: inline-flex; align-items: center; gap: 6px; color: #526971; font-size: .82rem; text-decoration: none; white-space: nowrap; }
.police-beian-link img { width: 20px; height: 20px; flex: 0 0 20px; object-fit: contain; }
.icp-link { color: #526971; font-size: .82rem; text-decoration: none; }
.police-beian-link:hover, .police-beian-link:focus-visible, .icp-link:hover, .icp-link:focus-visible { color: #006c70; text-decoration: underline; }
@media (min-width: 720px) { .site-compliance-footer { margin-bottom: 0; } }
@media (max-width: 430px) {
  .legal-topbar { grid-template-columns: auto 1fr auto; }
  .legal-back { min-width: 0; padding: 0 12px; }
}
