:root{--bg:#eef1f5;--panel:#fffffff7;--text:#1f2937;--muted:#6b7280;--line:#e5e7eb;--accent:#ff7a00;--accent-soft:#fff1e5;--dark:#1f2937;--shadow:0 6px 24px #0f172a29;--radius:16px;--safe-b:env(safe-area-inset-bottom,0px);--safe-t:env(safe-area-inset-top,0px)}*{box-sizing:border-box}html,body{background:var(--bg);height:100%;color:var(--text);-webkit-tap-highlight-color:transparent;overscroll-behavior:none;margin:0;font:15px/1.4 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;overflow:hidden}#viewer{touch-action:none;position:fixed;inset:0}svg{fill:none;stroke:currentColor;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round;flex:none;width:22px;height:22px}button{font:inherit;color:inherit;cursor:pointer}.topbar{top:calc(10px + var(--safe-t));pointer-events:none;z-index:10;align-items:center;gap:8px;display:flex;position:fixed;left:10px;right:10px}.topbar>*{pointer-events:auto}.title{background:var(--panel);min-width:0;box-shadow:var(--shadow);white-space:nowrap;text-overflow:ellipsis;border-radius:12px;flex:1;padding:10px 14px;font-weight:600;overflow:hidden}.icon-btn{background:var(--panel);width:44px;height:44px;box-shadow:var(--shadow);border:0;border-radius:12px;place-items:center;display:grid}.icon-btn:active{background:var(--accent-soft)}.icon-btn.small{width:36px;height:36px;box-shadow:none;background:0 0}.icon-btn.small svg{width:20px;height:20px}.toolbar{left:50%;bottom:calc(12px + var(--safe-b));background:var(--dark);box-shadow:var(--shadow);z-index:10;border-radius:18px;gap:2px;padding:5px;transition:bottom .25s;display:flex;position:fixed;transform:translate(-50%)}.toolbar button{color:#f9fafb;background:0 0;border:0;border-radius:13px;flex-direction:column;align-items:center;gap:2px;min-width:58px;padding:7px 6px 5px;font-size:11px;display:flex}.toolbar button:active:not(:disabled){background:#ffffff24}.toolbar button.on{background:var(--accent)}.toolbar button:disabled{opacity:.35;cursor:default}.sheet{background:var(--panel);border-radius:var(--radius) var(--radius) 0 0;z-index:20;max-height:72dvh;padding-bottom:var(--safe-b);flex-direction:column;transition:transform .25s;display:flex;position:fixed;bottom:0;left:0;right:0;box-shadow:0 -6px 30px #0f172a2e}.sheet[data-state=hidden]{transform:translateY(105%)}.sheet[data-state=peek] .sheet-body,.sheet[data-state=peek] .sheet-search{display:none}.sheet[data-state=full]{height:72dvh}.sheet-head{border-bottom:1px solid var(--line);cursor:pointer;-webkit-user-select:none;user-select:none;align-items:flex-start;gap:8px;padding:16px 10px 10px 16px;display:flex;position:relative}.grip{background:#d1d5db;border-radius:2px;width:40px;height:4px;margin-left:-20px;position:absolute;top:6px;left:50%}.head-text{flex:1;min-width:0}.kicker{color:var(--accent);text-transform:uppercase;letter-spacing:.04em;font-size:12px;font-weight:600}.head-title{overflow-wrap:anywhere;font-size:17px;font-weight:650}.head-sub{color:var(--muted);overflow-wrap:anywhere;font-size:13px}.sheet-search{border-bottom:1px solid var(--line);padding:8px 12px}.sheet-search input{border:1px solid var(--line);width:100%;font:inherit;background:#f9fafb;border-radius:10px;outline:none;padding:9px 12px}.sheet-search input:focus{border-color:var(--accent)}.sheet-body{-webkit-overflow-scrolling:touch;flex:1;padding:4px 0 90px;overflow-y:auto}details.group{border-bottom:1px solid var(--line)}details.group>summary{cursor:pointer;align-items:center;gap:8px;padding:12px 16px;font-weight:600;list-style:none;display:flex}details.group>summary::-webkit-details-marker{display:none}details.group>summary:before{content:"";border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);flex:none;width:7px;height:7px;transition:transform .15s;transform:rotate(-45deg)}details.group[open]>summary:before{transform:rotate(45deg)}summary .count{color:var(--muted);margin-left:auto;font-size:13px;font-weight:400}.rows{margin:0;padding:0 16px 10px}.row{border-top:1px dashed var(--line);grid-template-columns:minmax(110px,42%) 1fr;gap:10px;padding:6px 0;font-size:14px;display:grid}.row:first-child{border-top:0}.row dt{color:var(--muted);overflow-wrap:anywhere}.row dd{overflow-wrap:anywhere;-webkit-user-select:text;user-select:text;margin:0}mark{background:#ffe0b3;border-radius:3px}.tabs{background:#f3f4f6;border-radius:10px;flex:1;gap:4px;padding:3px;display:flex}.tab{background:0 0;border:0;border-radius:8px;flex:1;padding:7px;font-weight:600}.tab.active{background:#fff;box-shadow:0 1px 3px #0000001f}.filter-row{border-bottom:1px solid var(--line);align-items:center;gap:10px;padding:8px 12px 8px 16px;display:flex}.filter-row label{cursor:pointer;flex:1;align-items:center;gap:10px;min-width:0;display:flex}.filter-row input[type=checkbox]{width:20px;height:20px;accent-color:var(--accent);flex:none}.filter-row .name{overflow-wrap:anywhere}.filter-row .sub{color:var(--muted);font-size:12px}.pill{border:1px solid var(--line);background:#fff;border-radius:999px;flex:none;padding:6px 12px;font-size:13px}.pill:active{background:var(--accent-soft);border-color:var(--accent)}.filter-actions{gap:8px;padding:10px 16px;display:flex}.muted{color:var(--muted);padding:16px}.dialog-backdrop{z-index:40;background:#0f172a73;place-items:center;padding:16px;display:grid;position:fixed;inset:0}.dialog-backdrop[hidden]{display:none}.dialog{width:min(460px,100%);max-height:86dvh;box-shadow:var(--shadow);background:#fff;border-radius:18px;padding:16px;overflow-y:auto}.dialog-head{justify-content:space-between;align-items:center;margin-bottom:8px;display:flex}.dialog h2{margin:0;font-size:19px}.model-list{flex-direction:column;gap:6px;margin-bottom:12px;display:flex}.model-item{border:1px solid var(--line);text-align:left;background:#fff;border-radius:12px;align-items:center;gap:12px;width:100%;padding:12px;display:flex}.model-item:active{background:var(--accent-soft);border-color:var(--accent)}.model-item svg{color:var(--accent)}.model-item .sub{color:var(--muted);font-size:12px}.file-btn{background:var(--dark);color:#fff;cursor:pointer;border-radius:12px;justify-content:center;align-items:center;gap:8px;padding:12px;font-weight:600;display:flex}.file-btn input{display:none}.hint{color:var(--muted);margin:10px 2px 0;font-size:12.5px}code{background:#f3f4f6;border-radius:4px;padding:1px 5px;font-size:12px}.loading{z-index:50;background:#eef1f5b3;place-items:center;display:grid;position:fixed;inset:0}.loading[hidden]{display:none}.loading-card{width:min(320px,86vw);box-shadow:var(--shadow);background:#fff;border-radius:16px;padding:18px}.loading-text{overflow-wrap:anywhere;margin-bottom:10px;font-weight:600}.progress{background:#f3f4f6;border-radius:3px;height:6px;overflow:hidden}.bar{background:var(--accent);width:0;height:100%;transition:width .15s}.toast{left:50%;top:calc(66px + var(--safe-t));background:var(--dark);color:#fff;max-width:calc(100vw - 32px);box-shadow:var(--shadow);z-index:60;border-radius:12px;padding:10px 16px;font-size:14px;position:fixed;transform:translate(-50%)}@media (min-width:900px){.sheet{border-radius:var(--radius);width:380px;max-height:none;box-shadow:var(--shadow);padding-bottom:0;inset:66px 12px 12px auto}.sheet[data-state=hidden]{transform:translate(110%)}.sheet[data-state=peek] .sheet-body,.sheet[data-state=peek] .sheet-search,.sheet[data-state=peek] .sheet-search{display:block}.sheet[data-state=full]{height:auto}.sheet .grip{display:none}.sheet-head{cursor:default;padding-top:12px}.sheet-body{padding-bottom:12px}.filters{width:320px;left:12px;right:auto}.filters[data-state=hidden]{transform:translate(-110%)}}@media (max-width:899px){body.sheet-open .toolbar{bottom:-100px}body.sheet-peek .toolbar{bottom:calc(96px + var(--safe-b))}.sheet.filters[data-state=full]{height:auto;max-height:50dvh}.sheet.filters .sheet-body{padding-bottom:12px}}
