:root{--primary: #40a9ff;--bg: #f8fafc;--text: #334155;--title: #1e293b;--muted: #64748b;--line: #e2e8f0;--card-shadow: 0 4px 20px rgba(0, 0, 0, .08)}*{margin:0;padding:0;box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;background:var(--bg);color:var(--text);line-height:1.6}a{color:inherit;text-decoration:none}#root{min-height:100vh}button,input,textarea,select{font:inherit}.muted{color:var(--muted)}.error{color:#dc2626;margin-top:.5rem}.container{margin:0 auto;padding:0 20px;max-width:1200px}.app-shell{min-height:100vh;background:var(--bg);display:flex;flex-direction:column}.main-content{flex:1;padding:2rem 0 6rem}.icp-footer{text-align:center;padding:12px 0 18px;font-size:12px;color:#64748b}.beian-links{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;column-gap:20px;row-gap:4px}.beian-links a{display:inline-flex;align-items:center;gap:6px;color:inherit;line-height:1.5;white-space:nowrap}.beian-links a:hover{color:var(--primary);text-decoration:underline}.beian-links a:focus-visible{border-radius:3px;outline:2px solid var(--primary);outline-offset:2px}.beian-police-icon{width:16px;height:16px;flex:0 0 auto;object-fit:contain}.bottom-nav .beian-police-icon{width:14px;height:14px}.header-nav{background:var(--primary);color:#fff;padding:.9rem 0;box-shadow:0 2px 10px #0000001a;position:sticky;top:0;z-index:100}.header-nav-inner{display:flex;align-items:center;justify-content:space-between}.brand-title{font-size:1.15rem;font-weight:700}.user-chip{display:inline-flex;align-items:center;gap:.5rem;border-radius:24px;padding:.45rem .9rem;background:#ffffff29}.user-avatar{width:28px;height:28px;border-radius:50%;background:#ffffff4d;display:inline-flex;align-items:center;justify-content:center;font-size:.8rem}.top-nav{margin-top:1rem;display:flex;gap:.6rem;flex-wrap:wrap}.top-nav a{color:#0f172a;background:#fff;border:1px solid var(--line);border-radius:999px;padding:.42rem .9rem;font-size:.9rem}.top-nav a.active{background:var(--primary);color:#fff;border-color:transparent}.bottom-nav{position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid var(--line);box-shadow:0 -2px 10px #00000014;z-index:90;padding:.4rem 0 .25rem}.bottom-nav .nav-items{display:flex;justify-content:space-around}.bottom-nav .nav-items a{text-align:center;font-size:.75rem;color:var(--muted);padding:.4rem .6rem;border-radius:10px}.bottom-nav .nav-items a.active{color:var(--primary);background:#40a9ff1a}.bottom-nav .icp-mini{text-align:center;font-size:10px;color:#94a3b8;margin-top:2px}.btn{display:inline-flex;align-items:center;gap:.45rem;border-radius:8px;padding:.75rem 1.2rem;border:none;cursor:pointer;transition:all .25s ease}.btn-primary{background:var(--primary);color:#fff}.btn-primary:hover{transform:translateY(-2px);box-shadow:0 8px 20px #40a9ff4d}.btn-outline{background:transparent;color:var(--primary);border:1px solid var(--primary)}.btn-outline:hover{background:var(--primary);color:#fff}.btn-secondary{background:#f8fafc;color:var(--muted);border:1px solid var(--line)}.btn:disabled{opacity:.6;cursor:not-allowed}.panel,.card-link{background:#fff;border-radius:16px;border:1px solid var(--line);box-shadow:var(--card-shadow)}.panel{padding:1.5rem}.card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem}.card-link{padding:1.2rem;transition:all .25s ease}.card-link:hover{transform:translateY(-3px)}.inline-form{margin-top:1rem;display:grid;gap:.75rem}input,textarea,select{width:100%;border:1px solid #d1d5db;border-radius:8px;padding:.75rem;background:#fff}input:focus,textarea:focus,select:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px #40a9ff1f}.row-between{display:flex;justify-content:space-between;align-items:center;gap:.75rem;flex-wrap:wrap}.medical-record-page{color:#172554}.medical-record-heading{display:grid;grid-template-columns:minmax(160px,1fr) auto minmax(160px,1fr);align-items:end;gap:1rem;margin-bottom:1rem}.medical-record-heading-copy{grid-column:2;text-align:center}.medical-record-heading h1{color:#172554;font-size:1.55rem;line-height:1.35}.medical-record-heading p{margin-top:.3rem;color:#64748b;font-size:.92rem}.record-print-button{grid-column:3;justify-self:end;min-height:42px;border:0;border-radius:7px;padding:.65rem 1.05rem;background:#1677ff;color:#fff;font-weight:700;cursor:pointer;box-shadow:0 5px 14px #1677ff33}.record-print-button:hover{background:#0958d9}.record-print-button:focus-visible{outline:3px solid rgba(22,119,255,.25);outline-offset:2px}.record-section{margin-top:.75rem;padding:1rem 1.15rem;border:1px solid #e7eef8;border-radius:8px;background:#fff;box-shadow:0 6px 22px #1e40af12}.record-section h2{margin-bottom:.65rem;color:#172554;font-size:1.08rem;line-height:1.4}.record-section-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:.85rem;margin-bottom:.65rem}.record-section-title-row h2{margin-bottom:.15rem}.record-section-description{color:#64748b;font-size:.8rem}.record-medication-actions{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;justify-content:flex-end}.record-action-button{min-height:34px;padding:.38rem .7rem;border:1px solid #1677ff;border-radius:6px;background:#1677ff;color:#fff;font-size:.8rem;font-weight:700;cursor:pointer}.record-action-button-secondary{background:#fff;color:#1677ff}.record-action-button:hover{background:#0958d9;color:#fff}.record-summary-grid,.record-history-grid,.record-detail-grid,.record-examination-meta,.record-advice-grid{display:grid;margin:0;border-top:1px solid #dbe4f0;border-left:1px solid #dbe4f0;border-radius:6px;overflow:hidden}.record-summary-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.record-history-grid,.record-examination-meta,.record-advice-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.record-detail-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.record-detail-grid>div:nth-child(1),.record-detail-grid>div:nth-child(2),.record-detail-grid>div:nth-child(3){grid-column:span 2}.record-detail-grid>div:nth-child(4){grid-column:span 3}.record-detail-grid>div:nth-child(5){grid-column:span 3}.record-summary-grid>div,.record-history-grid>div,.record-detail-grid>div,.record-examination-meta>div,.record-advice-grid>div{min-width:0;border-right:1px solid #dbe4f0;border-bottom:1px solid #dbe4f0}.record-summary-grid dt,.record-history-grid dt,.record-detail-grid dt,.record-examination-meta dt,.record-advice-grid dt{padding:.48rem .65rem;background:#f8fbff;color:#172554;font-size:.84rem;font-weight:700;text-align:center}.record-summary-grid dd,.record-history-grid dd,.record-detail-grid dd,.record-examination-meta dd,.record-advice-grid dd{margin:0;padding:.55rem .65rem;color:#243b64;font-size:.9rem;text-align:center;overflow-wrap:anywhere}.record-table-wrap{width:100%;overflow-x:auto;border:1px solid #dbe4f0;border-radius:6px}.record-table{width:100%;border-collapse:collapse;color:#243b64;font-size:.86rem;line-height:1.45;text-align:center}.record-table th,.record-table td{padding:.58rem .65rem;border-right:1px solid #dbe4f0;border-bottom:1px solid #dbe4f0;vertical-align:middle}.record-table th:last-child,.record-table td:last-child{border-right:0}.record-table tbody tr:last-child td{border-bottom:0}.record-table th{background:#f8fbff;color:#172554;font-weight:700;white-space:nowrap}.record-surgery-table,.record-medication-table{min-width:820px}.record-medication-table{min-width:1080px}.record-medication-table th,.record-medication-table td{padding:.42rem}.record-medication-table input{min-width:112px;padding:.45rem .5rem;border-color:#dbe4f0;border-radius:5px;color:#243b64;font-size:.82rem;text-align:center}.record-medication-table th:first-child,.record-medication-table td:first-child,.record-medication-table th:nth-child(5),.record-medication-table td:nth-child(5){min-width:170px}.record-delete-button{border:0;background:transparent;color:#dc2626;font-size:.8rem;cursor:pointer}.record-delete-button:hover{text-decoration:underline}.record-medication-empty{padding:1rem!important;color:#64748b}.record-save-status{margin-top:.45rem;color:#15803d;font-size:.8rem;text-align:right}.record-examination-table{min-width:680px}.record-history-grid,.record-examination-meta{margin-top:.55rem}.record-status{font-weight:700}.record-status-high{color:#dc2626}.record-status-low{color:#2563eb}.record-status-normal{color:#16a34a}.record-status-neutral{color:#64748b}.record-advice-section{padding-bottom:1.1rem}.record-advice-grid{grid-template-columns:minmax(0,3fr) minmax(220px,1fr)}.record-footnote{margin:.8rem 0 0;padding:0 .4rem;color:#64748b;font-size:.78rem;line-height:1.55}@media (max-width: 768px){.medical-record-heading{display:flex;flex-direction:column;align-items:stretch}.medical-record-heading-copy{order:1}.record-print-button{order:2;align-self:center}.record-section{padding:.85rem}.record-section-title-row{flex-direction:column}.record-medication-actions{width:100%;justify-content:flex-start}.record-summary-grid,.record-history-grid,.record-examination-meta,.record-advice-grid,.record-detail-grid{grid-template-columns:1fr}.record-detail-grid>div:nth-child(n){grid-column:auto}}@media print{.header-nav,.bottom-nav,.record-print-button,.record-medication-actions,.record-save-status,.record-medication-delete-cell{display:none!important}.record-medication-table input{padding:0;border:0;box-shadow:none;background:transparent}.main-content{padding:0}.container{max-width:none;padding:0}.record-section{break-inside:avoid;box-shadow:none}}.chat-box{background:#fff;border-radius:12px;min-height:420px;max-height:620px;overflow:auto;border:1px solid var(--line);box-shadow:0 8px 24px #0f172a0f;padding:1rem}.msg{margin-bottom:1rem}.msg .role{font-size:.76rem;font-weight:700;color:var(--muted);margin-bottom:.28rem;display:inline-block}.msg-body{border-radius:10px;padding:.85rem .95rem;background:#f8fafc;font-size:.95rem;line-height:1.65}.msg.user .msg-body{background:#e6f7ff}.msg.assistant .msg-body{background:#fff;border:1px solid #e6edf5}.assistant-text{white-space:normal;color:#1f2937;font-family:PingFang SC,Microsoft YaHei,Noto Sans CJK SC,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;font-size:.95rem;line-height:1.74;word-break:break-word}.assistant-text :first-child{margin-top:0}.assistant-text>*{margin:0}.assistant-text>*+*{margin-top:.5rem}.assistant-text h1,.assistant-text h2,.assistant-text h3,.assistant-text h4,.assistant-text h5,.assistant-text h6{color:#102a43;font-size:1rem;font-weight:700;line-height:1.45;margin-top:.8rem}.assistant-text .assistant-heading{border-left:3px solid var(--primary);padding:.08rem 0 .08rem .55rem;background:transparent}.assistant-text .assistant-heading-conclusion{border-left-color:#10b981;color:#065f46}.assistant-text .assistant-heading-advice{border-left-color:var(--primary)}.assistant-text .assistant-heading-warning{border-left-color:#f97316;color:#9a3412}.assistant-text ul,.assistant-text ol{margin:.28rem 0 0;padding-left:1.15rem}.assistant-text li+li{margin-top:.28rem}.assistant-text li::marker{color:var(--primary);font-weight:700}.assistant-text p{margin:0}.assistant-text strong{color:#0f172a;font-weight:700}@media (max-width: 640px){.chat-box{padding:.85rem}.msg-body{padding:.78rem}.assistant-text{font-size:.94rem;line-height:1.72}.assistant-text .assistant-heading{font-size:.96rem}}.citation-link{color:var(--primary);display:inline-block;font-size:.72em;font-weight:700;line-height:1;margin:0 .12rem;text-decoration:none;vertical-align:super}.citation-link:before{content:"["}.citation-link:after{content:"]"}.citation-link:hover{text-decoration:underline}.incomplete-actions{margin-top:.75rem;display:flex;align-items:center;gap:.65rem;flex-wrap:wrap;color:#9a3412;font-size:.86rem}.ai-generated-notice{margin-top:.8rem;padding-top:.65rem;border-top:1px solid #eef2f7;color:#94a3b8;font-size:.75rem;line-height:1.5;text-align:center}.incomplete-actions .btn{padding:.42rem .75rem;font-size:.88rem}.general-medical-source-note{margin-top:.55rem;padding:.45rem .65rem;border-left:3px solid #94a3b8;border-radius:0 6px 6px 0;background:#f8fafc;color:#64748b;font-size:.78rem;line-height:1.5}.references-block{margin-top:.6rem;border-radius:8px;padding:.65rem .75rem;background:#f8fafc;border:1px solid #dbeafe;font-family:PingFang SC,Microsoft YaHei,Noto Sans CJK SC,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}.references-block h4{margin-bottom:.4rem;color:#0f172a;font-size:.9rem}.references-block ol{margin:0;padding-left:1.2rem;list-style-position:outside}.references-block li{margin:.55rem 0 .7rem;color:#334155;font-size:.88rem;line-height:1.45}.reference-title{color:#1e293b;line-height:1.5}.reference-excerpt{margin-top:.35rem}.reference-excerpt-label{display:block;margin-bottom:.25rem;color:#64748b;font-size:.75rem;font-weight:600}.reference-excerpt blockquote{margin:0;padding:.55rem .65rem;border-left:3px solid #93c5fd;border-radius:0 6px 6px 0;background:#fff;color:#475569;font-size:.82rem;line-height:1.65;overflow-wrap:anywhere;white-space:pre-wrap}.auth-page{min-height:100vh;display:flex;align-items:center;justify-content:center;background:var(--primary);padding:1.25rem;position:relative}.auth-page:before,.auth-page:after{content:"";position:absolute;border-radius:50%;background:#ffffff1f}.auth-page:before{width:280px;height:280px;top:-80px;right:-90px}.auth-page:after{width:180px;height:180px;left:-60px;bottom:30px}.auth-card{position:relative;z-index:1;width:min(520px,94vw);background:#fff;border-radius:20px;padding:2rem;box-shadow:0 20px 60px #00000047;display:grid;gap:.9rem}.auth-container{width:min(520px,94vw);position:relative;z-index:1}.auth-logo-block{display:flex;align-items:center;justify-content:center}.auth-logo-section{margin-bottom:1.15rem}.auth-logo-img{width:min(210px,52vw);height:auto;display:block}.auth-title{font-size:1.4rem;color:var(--title);margin-bottom:.2rem;text-align:center}.auth-card>.muted{text-align:center}.list-tight{margin-top:.45rem;padding-left:1.2rem}.list-tight li+li{margin-top:.3rem}.auth-agreement{text-align:center;margin-top:1rem;font-size:.92rem;color:#eaf5ff}.auth-agreement a{color:#fff;text-decoration:underline}.legal-page{min-height:100vh;background:linear-gradient(160deg,#0f172a,#1e3a5f 45%,#0ea5e9 180%);padding:1.25rem 1rem 3rem}.legal-page-nav{max-width:720px;margin:0 auto 1rem}.legal-back-link{font-size:.95rem;color:#e2e8f0;text-decoration:underline}.legal-back-link:hover{color:#fff}.legal-article{max-width:720px;margin:0 auto;background:#fffffff5;color:#1e293b;border-radius:16px;padding:1.75rem 1.5rem 2.5rem;box-shadow:var(--card-shadow);line-height:1.75;font-size:.98rem}.legal-h1{font-size:1.35rem;font-weight:700;color:var(--title);margin-bottom:1.25rem;line-height:1.35}.legal-h2{font-size:1.05rem;font-weight:700;color:var(--title);margin:1.5rem 0 .65rem;line-height:1.4}.legal-h2:first-of-type{margin-top:.75rem}.legal-p{margin:.5rem 0;text-align:justify}.legal-article strong{font-weight:600;color:#0f172a}.legal-article ul,.legal-article ol{margin:.5rem 0 .5rem 1.35rem;padding:0}.legal-article li+li{margin-top:.35rem}.auth-switch,.auth-card input,.auth-card select{text-align:center}.profile-edit-form{display:flex;flex-direction:column;gap:.55rem}.profile-edit-form label{font-size:.85rem;margin-top:.25rem}.profile-edit-form input,.profile-edit-form select{width:100%;padding:.5rem .65rem;border:1px solid var(--line);border-radius:8px}.auth-card .btn{justify-content:center}.checkin-panel{border:1px solid #dbeafe}.checkin-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:.9rem}.checkin-done{color:#16a34a;font-weight:700}.checkin-pending{color:#f59e0b;font-weight:700}.checkin-history-panel{border:1px solid #e2e8f0}.checkin-history-list{list-style:none;display:grid;gap:.7rem}.checkin-history-list li{border:1px solid #e2e8f0;border-radius:12px;padding:.75rem;display:flex;justify-content:space-between;gap:.8rem;align-items:center;flex-wrap:wrap}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px}@media (max-width: 768px){.container{padding:0 14px}.main-content{padding:1rem 0 6rem}.panel{padding:1rem}}
