*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
:root{--blue:#1668dc;--blue-d:#0f52b3;--blue-l:#e8f1ff;--bg:#f4f6fa;--card:#fff;--text:#1f2937;--muted:#64748b;--line:#e3e9f2;--red:#d92d20;--green:#079455;--amber:#dc6803}
html,body{margin:0;padding:0;height:100%;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;font-size:15px}
#app{display:flex;flex-direction:column;height:100vh;height:100dvh;max-width:640px;margin:0 auto;background:var(--bg);position:relative;overflow:hidden}
#hdr{background:linear-gradient(135deg,#1668dc,#0f52b3);color:#fff;padding:calc(env(safe-area-inset-top) + 14px) 18px 14px;flex-shrink:0;position:relative}
.hdr-title{font-size:19px;font-weight:700;letter-spacing:.5px}
.hdr-sub{font-size:11px;opacity:.82;margin-top:3px}
.hdr-back{position:absolute;right:14px;top:calc(env(safe-area-inset-top) + 12px);background:rgba(255,255,255,.18);border:0;color:#fff;border-radius:16px;padding:5px 12px;font-size:13px}
main{flex:1;overflow-y:auto;padding:14px 14px calc(76px + env(safe-area-inset-bottom));-webkit-overflow-scrolling:touch}
#tabbar{height:calc(60px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:#fff;border-top:1px solid var(--line);display:flex;flex-shrink:0;position:absolute;bottom:0;left:0;right:0;z-index:20}
.tab{flex:1;border:0;background:none;color:var(--muted);font-size:11px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}
.tab .ti{font-size:21px;line-height:1}
.tab.active{color:var(--blue);font-weight:700}
.card{background:var(--card);border-radius:14px;padding:16px;margin-bottom:12px;box-shadow:0 2px 10px rgba(15,40,80,.05)}
.card.tight{padding:12px}
.row{display:flex;align-items:center;gap:10px}
.row.between{justify-content:space-between}
.grow{flex:1;min-width:0}
.h2{font-size:16px;font-weight:700;margin:0 0 12px;display:flex;align-items:center;gap:7px}
.h2::before{content:'';width:4px;height:16px;background:var(--blue);border-radius:2px}
.h3{font-size:14px;font-weight:700;margin:16px 0 8px;color:#334155}
.muted{color:var(--muted);font-size:12px}
.tiny{font-size:11px;color:var(--muted)}
label.f{display:block;font-size:12px;color:var(--muted);margin:10px 0 5px}
input[type=text],input[type=tel],input[type=date],input[type=number],textarea,select{width:100%;border:1px solid var(--line);background:#fbfcfe;border-radius:9px;padding:11px 12px;font-size:15px;color:var(--text);outline:none;font-family:inherit}
input:focus,textarea:focus,select:focus{border-color:var(--blue);background:#fff}
textarea{resize:vertical;min-height:70px;line-height:1.5}
.btn{border:0;border-radius:10px;padding:12px 16px;font-size:14px;font-weight:600;cursor:pointer;background:var(--blue);color:#fff;display:inline-flex;align-items:center;justify-content:center;gap:6px}
.btn:active{opacity:.85}
.btn.block{width:100%}
.btn.ghost{background:#fff;color:var(--blue);border:1px solid var(--blue)}
.btn.gray{background:#eef2f7;color:#475569}
.btn.danger{background:#fee4e2;color:var(--red)}
.btn.sm{padding:7px 11px;font-size:12px;border-radius:8px}
.btn.big{padding:15px;font-size:16px;border-radius:12px}
.btn:disabled{opacity:.5;cursor:not-allowed}
.hero{background:linear-gradient(140deg,#1668dc,#3b82f6);color:#fff;border-radius:16px;padding:20px;margin-bottom:14px;box-shadow:0 8px 22px rgba(22,104,220,.24)}
.hero h1{margin:0;font-size:20px}
.hero p{margin:8px 0 16px;font-size:12px;opacity:.9;line-height:1.6}
.hero .btn{background:#fff;color:var(--blue)}
.stat-row{display:flex;gap:10px;margin-bottom:12px}
.stat{flex:1;background:#fff;border-radius:12px;padding:12px;text-align:center;box-shadow:0 2px 8px rgba(15,40,80,.04)}
.stat b{display:block;font-size:20px;color:var(--blue)}
.stat span{font-size:11px;color:var(--muted)}
.steps{display:flex;gap:4px;margin-bottom:14px}
.step{flex:1;text-align:center;font-size:11px;color:var(--muted);padding:7px 2px;border-bottom:3px solid var(--line)}
.step.on{color:var(--blue);border-color:var(--blue);font-weight:700}
.step.done{color:var(--green);border-color:var(--green)}
.opts{display:flex;flex-wrap:wrap;gap:8px}
.opt{border:1px solid var(--line);background:#fff;border-radius:9px;padding:9px 12px;font-size:13px;cursor:pointer;color:#475569}
.opt.on{background:var(--blue-l);border-color:var(--blue);color:var(--blue);font-weight:700}
.chk{display:flex;flex-wrap:wrap;align-items:flex-start;gap:7px 10px;padding:10px 0;border-bottom:1px solid #f1f4f8;font-size:13px;line-height:1.45}
.chk:last-child{border-bottom:0}
.chk .lbl{flex:1 1 100%;min-width:0}
.mini-opts{display:flex;gap:6px;justify-content:flex-start}
.mini-opts .mini{min-width:46px;text-align:center}
.mini{border:1px solid var(--line);border-radius:7px;padding:5px 9px;font-size:12px;background:#fff;color:var(--muted);cursor:pointer}
.mini.on{background:var(--blue);color:#fff;border-color:var(--blue)}
.hz{border:1px solid var(--line);border-radius:12px;padding:12px;margin-bottom:10px;background:#fff}
.hz-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.hz-idx{background:var(--blue);color:#fff;width:22px;height:22px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;margin-right:6px}
.hz img{max-width:100%;border-radius:8px;margin-top:8px;display:block}
.photo-btn{border:1px dashed #b6c8e0;border-radius:9px;padding:12px;text-align:center;color:var(--blue);font-size:13px;background:#f8fbff;cursor:pointer}
.pill{display:inline-block;padding:3px 9px;border-radius:12px;font-size:11px;font-weight:600}
.pill.blue{background:var(--blue-l);color:var(--blue)}
.pill.red{background:#fee4e2;color:var(--red)}
.pill.green{background:#dcfae6;color:var(--green)}
.pill.amber{background:#fef0c7;color:var(--amber)}
.list-item{border-bottom:1px solid #f0f3f7;padding:12px 0;cursor:pointer}
.list-item:last-child{border-bottom:0}
.list-item h4{margin:0 0 5px;font-size:14px;line-height:1.45}
.searchbar{display:flex;gap:8px;margin-bottom:10px}
.searchbar input{flex:1}
.filter{display:flex;gap:6px;overflow-x:auto;padding-bottom:6px;margin-bottom:8px}
.filter .opt{white-space:nowrap;padding:7px 10px;font-size:12px}
.kb-item{background:#fff;border-radius:11px;padding:12px;margin-bottom:9px;border-left:3px solid var(--blue)}
.kb-item.major{border-left-color:var(--red)}
.kb-item h4{margin:0 0 6px;font-size:13px;line-height:1.5}
.kb-item .basis{font-size:11px;color:#475569;background:#f6f8fb;border-radius:6px;padding:7px;line-height:1.5;margin-top:6px}
.kb-item .meta{font-size:10px;color:var(--muted);margin-top:6px}
.modal-wrap{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:50;display:flex;align-items:flex-end;justify-content:center}
.modal-box{background:#fff;width:100%;max-width:640px;max-height:86vh;overflow-y:auto;border-radius:18px 18px 0 0;padding:18px}
.modal-title{font-size:16px;font-weight:700;margin-bottom:12px;display:flex;justify-content:space-between;align-items:center}
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:80px;background:rgba(15,23,42,.9);color:#fff;padding:10px 18px;border-radius:20px;font-size:13px;z-index:90;opacity:0;pointer-events:none;transition:opacity .2s;max-width:88%;text-align:center}
.toast.show{opacity:1}
.loading{display:inline-block;width:15px;height:15px;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite;vertical-align:-3px;margin-right:5px}
@keyframes spin{to{transform:rotate(360deg)}}
.preview h1{text-align:center;font-size:19px;margin:10px 0}
.preview h2{text-align:center;font-size:16px;margin:6px 0 16px}
.preview h3{font-size:14px;margin:16px 0 8px}
.preview .meta{font-size:12px;line-height:1.9}
.preview table{width:100%;border-collapse:collapse;font-size:11px;margin:8px 0 14px;table-layout:fixed}
.preview th,.preview td{border:1px solid #cbd5e1;padding:6px 5px;vertical-align:top;line-height:1.5;word-break:break-all}
.preview th{background:#eef3fa;font-weight:700;text-align:center}
.preview img{max-width:70px;border-radius:4px}
.empty{text-align:center;color:var(--muted);padding:36px 10px;font-size:13px}
.empty .ico{font-size:38px;opacity:.4;margin-bottom:8px}
.tag-row{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.divider{height:1px;background:var(--line);margin:14px 0}
.fixed-bottom{position:sticky;bottom:0;background:linear-gradient(transparent,#fff 22%);padding:12px 0 0;margin-top:8px}
