:root {
      --bg: #f0f4f8;
      --surface: #fff;
      --primary: #0d6b7c;
      --accent: #1a9e8f;
      --text: #1a2332;
      --muted: #5c6b7a;
      --border: #d6e0ea;
      --danger: #c0392b;
      --radius: 12px;
      --shadow: 0 8px 28px rgba(13, 107, 124, 0.08);
    }
    * { box-sizing: border-box; }
    .hidden { display: none !important; }
    body.is-busy { overflow: hidden; }
    body.modal-scroll-lock {
      overflow: hidden;
      position: fixed;
      width: 100%;
      left: 0;
      right: 0;
    }
    body {
      margin: 0;
      min-height: 100vh;
      font-family: "Noto Sans SC", system-ui, sans-serif;
      color: var(--text);
      background: var(--bg);
      line-height: 1.5;
    }
    body.app-page {
      color: #e8f0fe;
      background: transparent;
    }
    input, textarea, button { font-family: inherit; font-size: 1rem; }
    body.login-body { font-size: 17px; }
    .login-page {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      background: linear-gradient(145deg, #e8f4f6 0%, #f5f8fb 40%, #eef6f4 100%);
    }
    .login-card {
      width: 100%;
      max-width: 440px;
      background: var(--surface);
      border-radius: 16px;
      box-shadow: var(--shadow);
      padding: 32px 28px 28px;
      border: 1px solid var(--border);
    }
    .login-brand { display: flex; gap: 16px; align-items: center; margin-bottom: 28px; }
    .logo-mark {
      width: 52px; height: 52px; border-radius: 14px;
      object-fit: contain; flex-shrink: 0; display: block;
    }
    .login-card h1 { margin: 0; font-size: 1.4rem; }
    .login-card h1.login-title {
      display: flex;
      flex-direction: column;
      line-height: 1.35;
      gap: 4px;
    }
    .login-card h1.login-title .login-title-line { display: block; }
    .login-card .sub { margin: 6px 0 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
    .login-card--register { max-width: 460px; }
    .register-tip {
      margin: -4px 0 12px;
      font-size: 0.92rem;
      color: var(--muted);
      line-height: 1.5;
    }
    .register-tip strong { color: var(--text); font-weight: 700; }
    .field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
    .field label { font-size: 1rem; font-weight: 600; color: var(--text); }
    .field input {
      padding: 14px 16px; border-radius: 10px; border: 1px solid var(--border); width: 100%;
      font-size: 1.05rem;
    }
    .pwd-wrap { position: relative; display: block; }
    .pwd-wrap input { padding-right: 44px; }
    .pwd-toggle {
      position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
      border: none; background: transparent; cursor: pointer; padding: 6px;
      color: var(--muted); display: flex; align-items: center; justify-content: center;
    }
    .pwd-toggle:hover { color: var(--primary); }
    .pwd-toggle svg { width: 20px; height: 20px; display: block; }
    .btn {
      padding: 12px 16px; border-radius: 10px; border: none; cursor: pointer;
      font-weight: 600;
    }
    .btn-primary {
      background: var(--primary); color: #fff; width: 100%; margin-top: 4px;
      font-size: 1.1rem; padding: 14px 16px; min-height: 48px;
    }
    .btn-outline {
      background: #fff; color: var(--primary); border: 1px solid var(--border);
      text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
      gap: 6px; padding: 10px 16px; border-radius: 10px; font-weight: 600;
      cursor: pointer; font-family: inherit; font-size: 0.92rem; line-height: 1.2;
      transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
        box-shadow 0.15s ease, transform 0.1s ease;
      -webkit-tap-highlight-color: transparent;
    }
    button.btn-outline { appearance: none; }
    .btn-outline:hover:not(:disabled) {
      border-color: rgba(13, 107, 124, 0.45);
      background: linear-gradient(180deg, #f5fbfc 0%, #eef8f9 100%);
      box-shadow: 0 2px 10px rgba(13, 107, 124, 0.12);
      color: #0a5a68;
    }
    .btn-outline:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
    .btn-outline:focus-visible {
      outline: 2px solid rgba(13, 107, 124, 0.35);
      outline-offset: 2px;
    }
    .btn-outline:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
    .btn-outline.is-busy { opacity: 0.75; cursor: wait; pointer-events: none; }
    .btn-solid {
      background: var(--primary); color: #fff; border: 1px solid var(--primary);
      text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
      padding: 10px 16px; border-radius: 10px; font-weight: 600; cursor: pointer;
      transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    }
    a.btn-solid:hover { background: #0a5a68; border-color: #0a5a68; color: #fff; box-shadow: 0 2px 10px rgba(13, 107, 124, 0.2); }
    .err { color: var(--danger); font-size: 0.88rem; margin: 0 0 8px; }
    .hint { font-size: 0.82rem; color: var(--muted); text-align: center; margin: 12px 0 0; }
    .hint a { color: var(--primary); font-weight: 600; text-decoration: none; }
    .sms-row { display: flex; gap: 8px; align-items: stretch; }
    .sms-row input { flex: 1; min-width: 0; }
    .btn-sms {
      flex: 0 0 auto; white-space: nowrap;
      padding: 14px 12px; font-size: 0.95rem; min-height: 48px;
    }
    .top-nav {
      display: flex; align-items: center; justify-content: space-between; gap: 16px;
      padding: 14px 22px; background: var(--surface); border-bottom: 1px solid var(--border);
      position: sticky; top: 0; z-index: 10;
    }
    .nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
    .nav-logo {
      width: 34px; height: 34px; border-radius: 10px;
      object-fit: contain; flex-shrink: 0; display: block;
    }
    .nav-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
    .nav-links a, .nav-links button {
      padding: 8px 12px; border-radius: 8px; font-weight: 600; border: none; background: transparent;
      color: var(--primary); cursor: pointer; text-decoration: none;
    }
    .nav-links button.ghost { border: 1px solid var(--border); background: #fff; color: var(--muted); }
    .nav-links a.active { background: linear-gradient(135deg, #e8f6f8, #f2fbfa); color: var(--primary); }
    .nav-user {
      margin-left: 4px;
      padding: 8px 12px;
      font-size: 0.9rem;
      font-weight: 600;
      color: var(--text);
    }
    .layout { max-width: 1120px; margin: 0 auto; padding: 24px 20px 48px; }
    .page-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
    .page-header h1 { margin: 0; font-size: 1.45rem; }
    .page-header .muted { margin: 8px 0 0; color: var(--muted); font-size: 0.92rem; }
    .header-actions { display: flex; gap: 10px; flex-wrap: wrap; }
    .toast {
      margin-bottom: 12px; padding: 10px 14px; border-radius: 10px;
      background: #e6f4ef; color: #1d6f4d; font-size: 0.9rem;
    }
    .shell {
      display: grid;
      grid-template-columns: minmax(200px, 240px) 1fr;
      gap: 20px;
      align-items: start;
    }
    .tabs { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 72px; }
    .tab-btn {
      display: flex; align-items: center; gap: 10px; text-align: left;
      padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
      background: #fff; cursor: pointer; font-weight: 600;
    }
    .tab-btn.active { border-color: var(--primary); background: linear-gradient(135deg, #e8f6f8, #f2fbfa); color: var(--primary); }
    .tab-num {
      width: 26px; height: 26px; border-radius: 50%; background: rgba(13,107,124,0.12);
      display: flex; align-items: center; justify-content: center; font-size: 0.82rem;
    }
    .section-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
    .section-head h2 { margin: 0; font-size: 1.15rem; }
    .pill {
      font-size: 0.78rem; padding: 4px 10px; border-radius: 999px;
      background: #eef4f8; color: var(--muted); font-weight: 600;
    }
    .form-card {
      background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border);
      box-shadow: var(--shadow); padding: 8px 18px;
    }
    .form-row {
      display: flex; flex-direction: column; gap: 8px;
      padding: 14px 0; border-bottom: 1px solid var(--border);
    }
    .form-row:last-child { border-bottom: none; }
    .form-row label.title { font-weight: 600; font-size: 0.92rem; }
    .form-row label.title .req { color: var(--danger); margin-left: 2px; }
    .pill-staff {
      display: inline-block; font-size: 0.7rem; font-weight: 600;
      padding: 1px 6px; border-radius: 4px; margin-left: 6px;
      background: #e8f4f6; color: var(--primary);
    }
    .form-row select {
      width: 100%; padding: 10px 12px; border-radius: 8px;
      border: 1px solid var(--border); background: #fff;
    }
    .form-row input, .form-row textarea {
      width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: #fbfdfe;
    }
    .form-row textarea { min-height: 72px; resize: vertical; }
    .checks {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
      gap: 10px;
      margin-top: 2px;
    }
    .checks-hint {
      font-size: 0.78rem;
      color: var(--muted);
      margin: 0 0 8px;
      line-height: 1.45;
    }
    .checks label {
      display: flex;
      align-items: center;
      gap: 8px;
      cursor: pointer;
      font-size: 0.88rem;
      font-weight: 500;
      margin: 0;
      padding: 10px 12px;
      min-height: 44px;
      border-radius: 10px;
      border: 1.5px solid var(--border);
      background: #fbfdfe;
      transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
      user-select: none;
      -webkit-tap-highlight-color: transparent;
    }
    .checks label:hover {
      border-color: rgba(13, 107, 124, 0.35);
      background: #f5fafb;
    }
    .checks label:focus-within {
      outline: 2px solid rgba(13, 107, 124, 0.25);
      outline-offset: 1px;
    }
    .checks label:has(input:checked) {
      border-color: var(--primary);
      background: linear-gradient(135deg, #e8f6f8 0%, #f0fbf9 100%);
      color: var(--primary);
      box-shadow: 0 2px 8px rgba(13, 107, 124, 0.1);
    }
    .checks label input[type="checkbox"] {
      width: 18px;
      height: 18px;
      margin: 0;
      flex: 0 0 18px;
      accent-color: var(--primary);
      cursor: pointer;
    }
    .checks label span {
      flex: 1;
      line-height: 1.35;
      word-break: keep-all;
      overflow-wrap: anywhere;
    }
    .history-layout { max-width: 960px; margin: 0 auto; padding: 24px 20px 48px; }
    .history-layout .page-header h1 { margin: 0; font-size: 1.45rem; }
    .report-card {
      border-radius: var(--radius); border: 1px solid var(--border);
      background: var(--surface); box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden;
    }
    .report-head {
      width: 100%; display: flex; justify-content: space-between; gap: 16px;
      padding: 16px 18px; border: none; background: transparent; cursor: pointer; text-align: left;
    }
    .report-title { font-weight: 700; margin-bottom: 6px; }
    .report-summary { font-size: 0.92rem; margin-bottom: 6px; }
    .report-meta { font-size: 0.82rem; color: var(--muted); }
    .chevron { flex-shrink: 0; color: var(--primary); font-weight: 600; font-size: 0.85rem; }
    .report-body { border-top: 1px solid var(--border); padding: 12px 18px 18px; background: #fbfdfe; }
    .detail-row {
      display: grid;
      grid-template-columns: minmax(160px, 34%) 1fr;
      gap: 12px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid #e8eef3;
    }
    .detail-row:last-child { border-bottom: none; margin-bottom: 0; }
    .detail-l { font-size: 0.86rem; font-weight: 600; color: var(--muted); }
    .detail-v { font-size: 0.9rem; white-space: pre-wrap; word-break: break-word; }
    .empty-card {
      padding: 36px; border-radius: var(--radius); border: 1px dashed var(--border);
      background: #fff; text-align: center;
    }
    /* —— 响应式：平板 —— */
    @media (max-width: 1024px) {
      .layout { max-width: 100%; padding: 20px 16px 40px; }
      .history-layout { max-width: 100%; padding: 20px 16px 40px; }
    }

    @media (max-width: 820px) {
      .shell { grid-template-columns: 1fr; }
      .tabs {
        flex-direction: row;
        flex-wrap: nowrap;
        position: sticky;
        top: 56px;
        z-index: 5;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding: 8px 0 12px;
        margin: 0 -4px;
        scrollbar-width: none;
      }
      .tabs::-webkit-scrollbar { display: none; }
      .tabs .tab-btn {
        flex: 0 0 auto;
        min-width: 108px;
        padding: 10px 12px;
        font-size: 0.84rem;
      }
      .tabs .tab-num { width: 22px; height: 22px; font-size: 0.75rem; }
      .header-actions .btn-outline:not(.ocr-btn) { display: none; }
      .page-header h1 { font-size: 1.22rem; }
    }

    /* —— 响应式：手机 —— */
    .nav-toggle {
      display: none;
      border: 1px solid var(--border);
      background: #fff;
      border-radius: 10px;
      width: 40px;
      height: 40px;
      padding: 0;
      cursor: pointer;
      color: var(--primary);
      flex-shrink: 0;
    }
    .nav-toggle svg { width: 22px; height: 22px; display: block; margin: auto; }

    .mobile-action-bar {
      display: none;
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 20;
      padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
      background: rgba(255, 255, 255, 0.96);
      border-top: 1px solid var(--border);
      box-shadow: 0 -6px 24px rgba(13, 107, 124, 0.08);
      gap: 8px;
    }
    .mobile-action-bar .btn-solid { flex: 1; width: auto; }
    .mobile-action-bar .btn-outline { flex: 0 0 auto; padding: 10px 12px; }

    .ocr-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-bottom: 12px;
    }
    .ocr-actions .btn-outline { font-size: 0.86rem; padding: 8px 12px; }

    .imaging-ocr-actions {
      margin-top: 8px;
    }

    .imaging-ocr-btn {
      min-height: 36px;
    }

    @media (max-width: 768px) {
      body.has-mobile-bar { padding-bottom: 76px; }
      .top-nav {
        padding: 10px 14px;
        gap: 10px;
      }
      .nav-brand span {
        font-size: 0.92rem;
        max-width: 11em;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
      .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        padding: 10px 14px 14px;
        box-shadow: var(--shadow);
      }
      .nav-links.is-open { display: flex; }
      .nav-links a, .nav-links button {
        width: 100%;
        text-align: left;
        padding: 12px 14px;
      }
      .top-nav { position: sticky; flex-wrap: wrap; }
      .layout { padding: 16px 12px 24px; }
      .history-layout { padding: 16px 12px 24px; }
      .form-card { padding: 4px 12px; }
      .header-actions { display: none; }
      .mobile-action-bar { display: flex; }
      .page-header .muted { font-size: 0.86rem; }
      .login-card { padding: 24px 20px 20px; }
      .login-card h1 { font-size: 1.15rem; }
      .detail-row { grid-template-columns: 1fr; }
      .checks { grid-template-columns: 1fr; gap: 8px; }
      .checks label { padding: 10px 12px; font-size: 0.86rem; }
      .report-head { flex-direction: column; gap: 8px; }
      .modal { padding: 10px; align-items: flex-end; }
      .report-modal-card { max-height: 92vh; border-radius: 16px 16px 0 0; }
      .report-modal-actions { flex-direction: column; }
      .report-modal-actions .btn-outline,
      .report-modal-actions .btn-solid { width: 100%; min-width: 0; }
    }

    /* —— 响应式：桌面宽屏 —— */
    .mobile-only-ocr { display: none; }
    @media (max-width: 768px) {
      .mobile-only-ocr { display: flex; }
    }

    @media (min-width: 1200px) {
      .layout { max-width: 1280px; }
      .shell { grid-template-columns: 260px 1fr; gap: 28px; }
      .form-card { padding: 12px 24px; }
      .page-header h1 { font-size: 1.6rem; }
    }
    .ocr-btn { cursor: pointer; display: inline-flex; align-items: center; }
    .submit-loading {
      position: fixed; inset: 0; z-index: 2000;
      display: flex; align-items: center; justify-content: center;
      padding: 24px;
      background: rgba(15, 28, 38, 0.52);
      backdrop-filter: blur(4px);
    }
    .submit-loading-card {
      width: min(360px, 100%);
      padding: 32px 28px 28px;
      border-radius: 18px;
      background: var(--surface);
      border: 1px solid var(--border);
      box-shadow: 0 20px 50px rgba(13, 107, 124, 0.18);
      text-align: center;
    }
    .submit-loading-spinner {
      width: 52px; height: 52px; margin: 0 auto 20px;
      border-radius: 50%;
      border: 4px solid #e3eef2;
      border-top-color: var(--primary);
      animation: spin 0.85s linear infinite;
    }
    .submit-loading-title {
      margin: 0 0 8px; font-size: 1.05rem; font-weight: 700; color: var(--text);
    }
    .submit-loading-hint {
      margin: 0; font-size: 0.88rem; color: var(--muted); line-height: 1.55;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    @keyframes modalIn {
      from { opacity: 0; transform: translateY(12px) scale(0.98); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }
    .modal {
      position: fixed; inset: 0; z-index: 1000;
      display: flex; align-items: center; justify-content: center; padding: 20px;
      overflow: hidden;
      overscroll-behavior: none;
    }
    .modal-backdrop {
      position: absolute; inset: 0; z-index: 0;
      background: rgba(26, 35, 50, 0.48);
      backdrop-filter: blur(3px);
      cursor: pointer;
    }
    .modal-card {
      position: relative; z-index: 2;
      width: min(720px, 100%); max-height: 85vh; overflow: auto;
      background: var(--surface); border-radius: 16px; border: 1px solid var(--border);
      box-shadow: var(--shadow); padding: 20px 22px;
    }
    .report-modal-card {
      width: min(820px, 100%);
      padding: 0;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      max-height: 88vh;
      animation: modalIn 0.28s ease-out;
    }
    .report-modal-hero {
      display: flex; align-items: flex-start; gap: 14px;
      padding: 22px 24px 18px;
      background: linear-gradient(135deg, #0d6b7c 0%, #1a9e8f 100%);
      color: #fff;
    }
    .report-modal-hero-main { flex: 1; min-width: 0; }
    .report-modal-tag {
      display: inline-block;
      font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
      padding: 3px 10px; border-radius: 999px;
      background: rgba(255, 255, 255, 0.18);
      margin-bottom: 8px;
    }
    .report-modal-hero h3 {
      margin: 0; font-size: 1.28rem; font-weight: 700; line-height: 1.35;
    }
    .report-modal-subtitle {
      margin: 8px 0 0; font-size: 0.88rem; opacity: 0.92;
    }
    .report-risk-badge {
      flex-shrink: 0;
      align-self: center;
      padding: 6px 14px;
      border-radius: 999px;
      font-size: 0.82rem; font-weight: 700;
      background: rgba(255, 255, 255, 0.95);
      color: var(--primary);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    .report-risk-badge.risk-ok { color: #1e7a45; }
    .report-risk-badge.risk-sub { color: #5a7a1e; }
    .report-risk-badge.risk-mild { color: #9a6b00; }
    .report-risk-badge.risk-moderate { color: #b34a00; }
    .report-risk-badge.risk-severe { color: var(--danger); }
    .modal-close-btn {
      flex-shrink: 0;
      width: 36px; height: 36px;
      border: none; border-radius: 10px;
      background: rgba(255, 255, 255, 0.15);
      color: #fff; font-size: 1.4rem; line-height: 1;
      cursor: pointer; transition: background 0.15s;
    }
    .modal-close-btn:hover { background: rgba(255, 255, 255, 0.28); }
    .report-modal-body {
      flex: 1; overflow: auto;
      padding: 18px 22px 8px;
      background: linear-gradient(180deg, #f8fbfc 0%, #fff 120px);
    }
    .report-section {
      margin-bottom: 14px;
      padding: 14px 16px;
      border-radius: 12px;
      border: 1px solid var(--border);
      background: #fff;
      box-shadow: 0 2px 8px rgba(13, 107, 124, 0.04);
    }
    .report-section:last-child { margin-bottom: 0; }
    .report-section-title {
      display: flex; align-items: center; gap: 8px;
      margin: 0 0 10px;
      font-size: 0.92rem; font-weight: 700; color: var(--primary);
    }
    .report-section-title::before {
      content: "";
      width: 4px; height: 16px; border-radius: 2px;
      background: linear-gradient(180deg, var(--primary), var(--accent));
    }
    .report-section-content {
      margin: 0;
      font-size: 0.9rem; line-height: 1.7;
      color: var(--text);
      white-space: pre-wrap;
      word-break: break-word;
    }
    .report-risk-tags {
      display: flex; flex-wrap: wrap; gap: 8px;
    }
    .report-risk-tag {
      display: inline-block;
      padding: 5px 12px;
      border-radius: 999px;
      font-size: 0.82rem; font-weight: 600;
      background: #fff4e8;
      color: #b34a00;
      border: 1px solid #ffd9b8;
    }
    .report-intervention-list {
      margin: 0; padding: 0; list-style: none;
      display: grid; gap: 10px;
    }
    .report-intervention-item {
      display: grid;
      grid-template-columns: 72px 1fr;
      gap: 10px;
      padding: 10px 12px;
      border-radius: 10px;
      background: #f5fafb;
      border: 1px solid #e3eef2;
    }
    .report-intervention-key {
      font-size: 0.82rem; font-weight: 700; color: var(--primary);
    }
    .report-intervention-val {
      font-size: 0.88rem; line-height: 1.6; color: var(--text);
    }
    .report-modal-actions {
      position: relative; z-index: 3;
      padding: 14px 22px 20px;
      border-top: 1px solid var(--border);
      background: #fff;
      flex-shrink: 0;
    }
    .report-modal-actions .btn-outline,
    .report-modal-actions .btn-solid {
      min-width: 108px;
    }
    .report-modal-actions .btn-print { border-color: rgba(13, 107, 124, 0.25); }
    .report-modal-actions .btn-print:hover:not(:disabled) {
      border-color: var(--primary);
      background: #eef8f9;
    }
    .report-modal-actions .btn-pdf {
      border-color: rgba(26, 156, 143, 0.35);
      color: #1a9e8f;
    }
    .report-modal-actions .btn-pdf:hover:not(:disabled) {
      border-color: #1a9e8f;
      background: #f0fbf9;
      color: #158f82;
    }
    .report-toolbar {
      display: flex; flex-wrap: wrap; gap: 8px;
      margin-bottom: 12px;
    }
    .btn-sm {
      padding: 6px 12px;
      font-size: 0.84rem;
    }
    .report-history-view {
      margin-bottom: 14px;
      padding: 12px 14px;
      border-radius: 10px;
      border: 1px solid var(--border);
      background: #fff;
    }
    .report-history-view .report-section {
      box-shadow: none;
      margin-bottom: 10px;
      padding: 10px 12px;
    }
    .pdf-export-root { position: absolute; left: -9999px; top: 0; }
    .modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
    .modal-head h3 { margin: 0; }
    .report-pre, .report-body pre.report-pre {
      white-space: pre-wrap; word-break: break-word; font-size: 0.9rem;
      background: #f7fafc; border: 1px solid var(--border); border-radius: 10px;
      padding: 14px; margin: 0 0 14px;
    }
    .modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
    @media (max-width: 640px) {
      .report-modal-hero { flex-wrap: wrap; padding: 18px 16px 14px; }
      .report-risk-badge { order: 3; width: 100%; text-align: center; }
      .report-intervention-item { grid-template-columns: 1fr; gap: 4px; }
    }
    .risk-pill {
      display: inline-block; font-size: 0.75rem; font-weight: 600;
      padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle;
    }
    .risk-ok { background: #e8f8ef; color: #1e7a45; }
    .risk-sub { background: #eef6e8; color: #5a7a1e; }
    .risk-mild { background: #fff6e5; color: #9a6b00; }
    .risk-moderate { background: #ffece5; color: #b34a00; }
    .risk-severe { background: #fde8e8; color: var(--danger); }

    .consent-row {
      display: flex; align-items: flex-start; gap: 10px;
      font-size: 0.92rem; line-height: 1.5; margin: 12px 0; cursor: pointer;
    }
    .consent-row input { margin-top: 4px; flex-shrink: 0; width: 18px; height: 18px; }
    .consent-row a { color: var(--primary); }
    .consent-gate {
      position: fixed; inset: 0; z-index: 2000;
      background: rgba(15, 23, 42, 0.45);
      display: flex; align-items: center; justify-content: center; padding: 20px;
    }
    .consent-gate.hidden { display: none !important; }
    body.health-consent-pending main.shell,
    body.health-consent-pending .mobile-action-bar {
      pointer-events: none;
      user-select: none;
    }
    .consent-gate-card {
      background: #fff; border-radius: 16px; padding: 28px 24px; max-width: 480px;
      box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    }
    .consent-gate-card h2 { margin: 0 0 12px; font-size: 1.25rem; }
    .consent-modal-card { max-width: 420px; padding: 22px; }
    .tongue-result-card {
      max-width: 520px;
      max-height: 85vh;
      display: flex;
      flex-direction: column;
      overflow: hidden;
    }
    .tongue-result-body {
      max-height: 42vh;
      flex: 1;
      min-height: 0;
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      margin: 12px 0 4px;
      padding: 14px;
      background: #f7fafc;
      border: 1px solid var(--border);
      border-radius: 10px;
      white-space: pre-wrap;
      line-height: 1.65;
      font-size: 0.98rem;
      color: var(--text);
    }
    .consent-inline {
      padding: 12px; background: #f7fafc; border: 1px dashed var(--border);
      border-radius: 10px; margin-top: 8px;
    }
    .form-row.field-error {
      border: 1px solid var(--danger);
      border-radius: 10px;
      padding: 10px;
      background: #fff5f5;
    }
    .form-row.field-error .title { color: var(--danger); }

    .form-row.ocr-filled {
      background: #f0fdf4;
      border-radius: 8px;
      box-shadow: inset 3px 0 0 #22c55e;
      padding-left: 10px;
      margin-left: -10px;
      transition: background 0.35s ease;
    }

    .form-row.ocr-filled .title {
      color: #15803d;
    }

    .section-intro {
      margin: 0 0 16px;
      padding: 12px 14px;
      border-radius: var(--radius);
      background: #f0f7ff;
      color: var(--text-muted);
      font-size: 0.92rem;
      line-height: 1.6;
    }

    .field-hint {
      margin: 4px 0 10px;
      font-size: 0.88rem;
      color: #b45309;
      line-height: 1.5;
    }

    .region-cascade {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
      gap: 10px;
      width: 100%;
    }

    .region-level {
      display: flex;
      flex-direction: column;
      gap: 4px;
      font-size: 0.85rem;
      color: var(--text-muted);
    }

    .region-level select,
    .region-level input {
      width: 100%;
    }

    .region-loading {
      margin: 0;
      font-size: 0.9rem;
    }

    .privacy-doc .privacy-list {
      margin: 8px 0 16px 20px;
      line-height: 1.7;
    }

    /* 报告解读页 */
    .interpret-layout { max-width: 960px; margin: 0 auto; padding: 24px 20px 48px; }
    .interpret-shell { display: flex; flex-direction: column; gap: 20px; }
    .interpret-input-card h2,
    .interpret-result-card h2,
    .interpret-history-card h2 { margin: 0 0 16px; font-size: 1.15rem; }
    .interpret-upload-zone {
      border: 2px dashed var(--border);
      border-radius: 12px;
      padding: 28px 20px;
      text-align: center;
      background: #fafcfd;
      margin-bottom: 16px;
      transition: border-color 0.2s, background 0.2s;
    }
    .interpret-upload-zone.is-dragover { border-color: var(--primary); background: #f0f9fb; }
    .interpret-upload-hint { margin: 0 0 12px; color: var(--muted); font-size: 0.92rem; }
    .interpret-preview,
    .interpret-thumb-row {
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      align-items: flex-start;
      gap: 10px;
      margin-bottom: 16px;
    }
    .interpret-result-images {
      margin-bottom: 14px;
    }
    .interpret-result-images .interpret-session-label {
      width: 100%;
      flex: 0 0 100%;
      margin: 0 0 8px;
      font-size: 0.86rem;
    }
    .interpret-thumb {
      position: relative;
      flex: 0 0 auto;
      width: 140px;
      height: 100px;
      border-radius: 8px;
      overflow: hidden;
      border: 1px solid var(--border);
      background: #f4f7f9;
    }
    .interpret-thumb img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      object-position: center;
      background: #f4f7f9;
    }
    .interpret-thumb-remove {
      position: absolute; top: 2px; right: 2px; width: 24px; height: 24px;
      border: none; border-radius: 50%; background: rgba(0,0,0,0.55); color: #fff; cursor: pointer; font-size: 16px; line-height: 1;
    }
    .interpret-text-field textarea { min-height: 120px; resize: vertical; }
    .interpret-char-count { display: block; text-align: right; font-size: 0.82rem; margin-top: 4px; }
    .interpret-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
    .interpret-disclaimer { margin: 14px 0 0; font-size: 0.84rem; }
    .interpret-result-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
    .interpret-result-body {
      max-height: 420px; overflow-y: auto; padding: 16px; border-radius: 10px;
      background: #f8fbfc; border: 1px solid var(--border); font-size: 0.95rem; line-height: 1.7;
    }
    .interpret-result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
    .interpret-session-label { margin: 0 0 8px; font-size: 0.86rem; }
    .interpret-thumb-readonly { cursor: default; }
    .interpret-history-list { display: flex; flex-direction: column; gap: 8px; }
    .interpret-history-item {
      display: flex; align-items: center; justify-content: space-between; gap: 12px;
      width: 100%; text-align: left; padding: 14px 16px; border: 1px solid var(--border);
      border-radius: 10px; background: #fff; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s;
    }
    .interpret-history-item:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(13,107,124,0.08); }
    .interpret-history-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
    .interpret-history-main strong { font-weight: 600; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .interpret-entry-btn { white-space: nowrap; }
    .pill-ok { background: #e8f7ef; color: #1a7a42; }
    .pill-warn { background: #fff0f0; color: #c0392b; }
    @media (max-width: 640px) {
      .interpret-layout { padding: 16px 12px 32px; }
      .header-actions .interpret-entry-btn { order: -2; }
    }
