:root{font-family:system-ui,-apple-system,"Microsoft YaHei",sans-serif;color:#1e293b;background:#f4f6f8;font-size:15px;line-height:1.55;color-scheme:light}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button{border:1px solid #cbd5e1;background:white;color:#334155;border-radius:6px;padding:7px 13px;cursor:pointer;white-space:nowrap}button:hover{background:#edf2f7}button:disabled{opacity:.5;cursor:default}.primary{background:#2563eb;color:white;border-color:#2563eb}.primary:hover{background:#1d4ed8}.quiet{padding:4px 8px;border-color:transparent;background:transparent;color:#2563eb}.danger{color:#b91c1c}h1,h2,h3,p{margin:0}h1{font-size:23px}h2{font-size:18px}h3{font-size:16px}p{margin:6px 0}.topbar{background:white;border-bottom:1px solid #e2e8f0;padding:16px 28px;display:flex;align-items:center;justify-content:space-between}.topbar>div{display:flex;gap:14px;align-items:baseline;flex-wrap:wrap}.subtitle,.small{color:#64748b;font-size:13px}.badge{display:inline-block;padding:2px 9px;border-radius:4px;font-size:12px;background:#eff6ff;color:#1d4ed8}.preview{background:#fff7ed;color:#9a3412}main{max-width:1440px;margin:auto;padding:18px 28px}.publishbar{display:flex;align-items:center;justify-content:space-between;gap:16px;background:white;padding:14px 18px;border:1px solid #e2e8f0;border-radius:8px}.publishbar strong{font-size:17px}.buttons{display:flex;gap:8px;flex-wrap:wrap}#notice{margin:10px 0;min-height:22px;color:#166534}#notice.error,.form-error{color:#b91c1c}.tabs{display:flex;gap:3px;border-bottom:1px solid #cbd5e1;margin-bottom:14px}.tabs button{border:0;background:transparent;border-radius:0;padding:9px 18px}.tabs .active{color:#2563eb;border-bottom:3px solid #2563eb;font-weight:600}.workspace{display:grid;grid-template-columns:260px minmax(0,1fr);background:white;border:1px solid #e2e8f0;border-radius:8px;min-height:600px}aside{border-right:1px solid #e2e8f0;padding:14px 10px}.section-head{display:flex;gap:10px;justify-content:space-between;align-items:center;margin-bottom:8px}aside .small{padding:0 5px}.scripts-panel{padding:16px 20px;min-width:0}.category-row{display:flex;align-items:center;gap:2px;padding:4px 3px;min-height:40px;border-radius:5px;flex-wrap:wrap}.category-row.root{margin-top:9px;font-weight:600}.category-row.child{margin-left:14px;border-left:2px solid #e2e8f0;padding-left:8px}.category-row.selected{background:#eff6ff;color:#1d4ed8}.category-name{border:0;background:transparent;padding:4px 2px;text-align:left;white-space:normal;word-break:break-word;flex:1;min-width:80px;color:inherit}.row-tools{display:flex;gap:0}.row-tools button{font-size:12px;padding:2px 4px;background:transparent;border:0;color:#64748b}.row-tools button:hover{background:#dbeafe}.drag-handle{color:#94a3b8;cursor:grab;font-size:15px}.drop-target{outline:2px dashed #60a5fa}.search{display:flex;align-items:center;gap:12px;margin:12px 0}.search span{font-size:13px;white-space:nowrap;color:#64748b}.search input{max-width:480px}.script-card{padding:12px 0;border-bottom:1px solid #e2e8f0}.script-head{display:flex;justify-content:space-between;gap:12px;align-items:center}.script-body{white-space:pre-wrap;overflow-wrap:anywhere;color:#475569;margin-top:4px;font-size:14px}.script-path{font-size:12px;color:#64748b}.card-tools{display:flex;gap:4px;flex-wrap:wrap;align-items:center}.card-tools button{padding:3px 9px;font-size:13px}.thumbnails{display:flex;gap:6px;margin-top:7px;flex-wrap:wrap}.thumbnails img,.photo-placeholder{width:64px;height:64px;object-fit:cover;border-radius:4px;border:1px solid #e2e8f0}.photo-placeholder{display:flex;align-items:center;justify-content:center;padding:4px;font-size:11px;text-align:center;color:#9a3412;background:#fff7ed}.empty{padding:45px 20px;color:#64748b;text-align:center}.pager{display:flex;gap:12px;justify-content:center;align-items:center;padding-top:16px;font-size:13px}.panel{background:white;padding:22px;border:1px solid #e2e8f0;border-radius:8px}.record{padding:14px 0;border-bottom:1px solid #e2e8f0;display:flex;gap:16px;justify-content:space-between;align-items:center}.hidden{display:none!important}label{display:block;font-size:14px;margin:10px 0}input,textarea{display:block;width:100%;padding:8px 10px;border:1px solid #cbd5e1;border-radius:5px;color:#1e293b;background:white;min-width:0}input:focus,textarea:focus{outline:2px solid #bfdbfe;border-color:#2563eb}textarea{resize:vertical}dialog{border:1px solid #cbd5e1;border-radius:10px;padding:22px;width:min(660px,calc(100vw - 28px));max-height:90vh;overflow:auto;box-shadow:0 15px 50px #0f172a33}dialog::backdrop{background:#0f172a66}dialog h2{margin-bottom:12px}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}.form-error{min-height:22px;font-size:14px;margin-top:8px}.url-add{display:flex;gap:8px;align-items:end}.url-add label{flex:1}.url-add button{margin-bottom:10px}.image-row{border-bottom:1px solid #e2e8f0;padding:10px 0;display:grid;grid-template-columns:80px minmax(0,1fr);gap:12px;align-items:center}.image-row img,.image-row .photo-placeholder{width:80px;height:80px}.image-row .buttons{margin-top:7px}.login-page{display:grid;min-height:100vh;place-items:center}.login-card{width:min(420px,calc(100vw - 32px));background:white;border:1px solid #e2e8f0;border-radius:10px;padding:28px}.login-card h1{font-size:21px}.login-card button{width:100%;margin-top:10px}#confirm-text{white-space:pre-line}button:focus-visible{outline:2px solid #60a5fa;outline-offset:2px}@media(max-width:850px){main{padding:12px}.topbar{padding:13px}.topbar h1{font-size:19px}.publishbar{align-items:flex-start;flex-direction:column}.workspace{grid-template-columns:210px minmax(0,1fr)}.scripts-panel{padding:12px}.script-head{align-items:flex-start;flex-direction:column}}@media(max-width:580px){.workspace{grid-template-columns:1fr}aside{border-right:0;border-bottom:1px solid #e2e8f0}.search{align-items:flex-start;flex-direction:column}.url-add{flex-direction:column;align-items:stretch}.url-add button{margin:0}.record{align-items:flex-start;flex-direction:column}.subtitle{display:none}}
:is(.script-head) h3{flex:1;text-align:left;overflow-wrap:anywhere}
.check-label{display:flex;align-items:flex-start;gap:8px;line-height:1.6}.check-label input{width:auto;margin-top:5px;flex:none}#import-summary{padding:12px 0;line-height:1.7}details{margin:14px 0}summary{cursor:pointer;color:#475569}
#cloud-status{white-space:pre-line;line-height:1.8;padding:12px;border:1px solid #cbd5e1;border-radius:6px}#cloud-status.connected{background:#f0fdf4;border-color:#86efac;color:#166534;font-weight:600}
