/* /studio/ 编辑器内模板快切按钮与弹窗样式 */
.head-btn.head-templates-btn{display:inline-flex;align-items:center;gap:6px;background:#f2efff;border-color:#c6bcf5;color:#4535c6}
.head-btn.head-templates-btn:hover{background:#e7e2ff;border-color:#9b8ef0}

.tpl-modal-root[hidden]{display:none}
.tpl-modal-root{position:fixed;inset:0;z-index:60;display:grid;place-items:center;padding:20px}
.tpl-modal-backdrop{position:absolute;inset:0;background:rgba(15,16,28,0.52);backdrop-filter:blur(6px)}
.tpl-modal-dialog{position:relative;z-index:1;width:min(980px,100%);max-height:min(88vh,860px);display:flex;flex-direction:column;background:#fbfafc;border:1px solid #e2dfe9;border-radius:20px;box-shadow:0 28px 80px rgba(15,16,32,0.28);overflow:hidden}
.tpl-modal-header{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 22px;background:#fff;border-bottom:1px solid #e7e4ec}
.tpl-modal-header h2{margin:0;font-size:18px;font-weight:820;letter-spacing:-.3px;color:#18171f}
.tpl-modal-header p{margin:3px 0 0;font-size:13px;color:#666270}
.tpl-modal-close{flex:none;width:36px;height:36px;border:1px solid #e2dfe9;border-radius:10px;background:#fff;color:#45424f;font-size:20px;line-height:1;display:grid;place-items:center}
.tpl-modal-close:hover{background:#f4f2ff;border-color:#aaa1ed;color:#4535c6}
.tpl-modal-bar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:12px 22px;background:#f5f3fa;border-bottom:1px solid #e7e4ec}
.tpl-keep-toggle{display:inline-flex;align-items:center;gap:9px;font-size:13px;font-weight:650;color:#272434;cursor:pointer}
.tpl-keep-toggle input{width:17px;height:17px;accent-color:#5b4bd8;cursor:pointer}
.tpl-modal-home-link{font-size:12px;font-weight:700;color:#5145c7;text-decoration:none}
.tpl-modal-home-link:hover{text-decoration:underline}
.tpl-modal-grid{flex:1;overflow:auto;padding:18px 22px 24px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.tpl-pick-card{display:flex;flex-direction:column;gap:11px;padding:14px;border:1px solid #e4e1ea;border-radius:16px;background:#fff;transition:border-color .16s,box-shadow .16s,transform .16s}
.tpl-pick-card:hover{border-color:#a599f0;box-shadow:0 10px 28px rgba(72,58,196,0.11);transform:translateY(-1px)}
.tpl-pick-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.tpl-pick-head strong{display:block;font-size:15px;font-weight:800;color:#1a1922;line-height:1.25}
.tpl-pick-arch{display:inline-block;margin-top:4px;padding:2px 8px;border-radius:999px;background:#18171f;color:#fff;font-size:10px;font-weight:750;line-height:1.35}
.tpl-pick-head small{display:block;margin-top:4px;font-size:11.5px;color:#6c6878}
.tpl-pick-device{flex:none;padding:4px 8px;border-radius:999px;background:#f0eefb;color:#5145c7;font-size:10.5px;font-weight:750;white-space:nowrap}
.tpl-pick-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;padding:8px;border-radius:12px;background:#f4f3f8}
.tpl-pick-card.is-panorama .tpl-pick-strip{gap:2px}
.tpl-pick-card.is-panorama .tpl-pick-strip canvas:nth-child(1){border-top-right-radius:2px;border-bottom-right-radius:2px}
.tpl-pick-card.is-panorama .tpl-pick-strip canvas:nth-child(2){border-top-left-radius:2px;border-bottom-left-radius:2px}
.tpl-pick-strip canvas{display:block;width:100%;height:auto;border-radius:6px;box-shadow:0 2px 8px rgba(17,19,28,0.12)}
.tpl-pick-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:auto}
.tpl-pick-swatches{display:inline-flex;align-items:center;gap:5px}
.tpl-pick-swatches i{display:block;width:14px;height:14px;border-radius:50%;border:1px solid rgba(0,0,0,0.12)}
.tpl-pick-apply{border:0;border-radius:10px;background:#5b4bd8;color:#fff;padding:8px 14px;font-size:12px;font-weight:750}
.tpl-pick-apply:hover{background:#4b3bc8}

@media(max-width:760px){
  header{height:auto;min-height:58px;flex-wrap:wrap;padding:8px 12px;row-gap:6px}
  .head-actions{flex-wrap:wrap;justify-content:flex-end}
  .head-actions .head-templates-btn{display:inline-flex;padding:5px 8px;font-size:11px;line-height:1.1}
  .tpl-modal-root{padding:10px}
  .tpl-modal-grid{grid-template-columns:1fr;padding:14px}
  .tpl-modal-header,.tpl-modal-bar{padding:14px}
}
@media(max-width:420px){
  .head-actions .head-templates-btn{padding:4px 6px;font-size:10.5px}
}
