html.is-nstudio-template-library-open{overflow:hidden}
.nstudio-page.is-nstudio-embed .nstudio-embed-template-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;margin-left:auto;margin-right:8px;padding:8px 14px;min-height:34px;border:1px solid #96b8cb;border-radius:6px;background:#eaf3f8;color:#3c6d85;font-size:12px;font-weight:700;white-space:nowrap;cursor:pointer}
.nstudio-page.is-nstudio-embed .nstudio-embed-template-btn .icon{margin:0!important}
.nstudio-page.is-nstudio-embed .nstudio-embed-template-btn:hover{background:#d9eaf4;border-color:#83a9bf}
.nstudio-page.is-nstudio-embed .nstudio-column-heading-spec .nstudio-mobile-sheet-close{margin-left:0}
.nstudio-template-product-tabs[hidden]{display:none!important}
.nstudio-template-library-modal[hidden]{display:none}
.nstudio-template-library-modal{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:24px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP",sans-serif}
.nstudio-template-library-backdrop{position:absolute;inset:0;background:rgba(20,27,24,.52)}
.nstudio-template-library-dialog{position:relative;width:min(1040px,96vw);max-height:90vh;overflow:auto;border-radius:14px;background:#fff;box-shadow:0 20px 70px rgba(0,0,0,.28);color:#2f3b37}
.nstudio-template-library-head{position:sticky;top:0;z-index:3;display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px 20px 14px;border-bottom:1px solid #e3e8e5;background:#fff}
.nstudio-template-library-head h3{margin:0;font-size:20px;line-height:1.35}.nstudio-template-library-head p{margin:4px 0 0;color:#74807b;font-size:12px}
.nstudio-template-library-modal button.nstudio-template-library-close{all:revert;box-sizing:border-box;appearance:none;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:36px;height:36px;border:1px solid #d5ddd9;border-radius:9px;background:#fff;color:#53615b;font-size:24px;line-height:1;cursor:pointer}
.nstudio-template-library-status{margin:14px 20px 0;padding:10px 12px;border-radius:8px;background:#f4f7f5;font-size:12px;line-height:1.55}.nstudio-template-library-status.is-error{background:#fff0ef;color:#9d2922}.nstudio-template-library-status.is-success{background:#eff8f2;color:#27623d}.nstudio-template-library-status.is-loading{background:#f3f7f5;color:#4e665d}.nstudio-template-library-status a{font-weight:800}
.nstudio-template-library-save{display:grid;gap:15px;padding:20px}.nstudio-template-field{display:grid;gap:7px}.nstudio-template-field>span{font-size:12px;font-weight:800;color:#53615b}.nstudio-template-field input,.nstudio-template-field select{width:100%;min-height:42px;box-sizing:border-box;border:1px solid #cfd8d4;border-radius:8px;background:#fff;padding:8px 10px;font:inherit;color:#2f3b37}.nstudio-template-field strong{padding:10px 0;font-size:14px}
.nstudio-template-library-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:4px;padding-top:14px;border-top:1px solid #e5e9e7}
.nstudio-template-library-modal :is(button,a).nstudio-template-primary,.nstudio-template-library-modal :is(button,a).nstudio-template-secondary,.nstudio-template-library-modal :is(button,a).nstudio-template-danger{all:revert;box-sizing:border-box;appearance:none;display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 13px;border-radius:8px;font-family:inherit;font-size:12px;font-weight:800;line-height:1.4;text-decoration:none;text-transform:none;border-radius:8px;cursor:pointer;white-space:normal;letter-spacing:normal;box-shadow:none}
.nstudio-template-library-modal :is(button,a).nstudio-template-primary{border:1px solid #315f55;background:#315f55 !important;color:#fff !important;-webkit-text-fill-color:#fff !important}
.nstudio-template-library-modal :is(button,a).nstudio-template-secondary{border:1px solid #ccd6d2;background:#fff;color:#36463f;-webkit-text-fill-color:#36463f}
.nstudio-template-library-modal :is(button,a).nstudio-template-danger{border:1px solid #e0b9b5;background:#fff;color:#9a3028;-webkit-text-fill-color:#9a3028}
.nstudio-template-library-modal :is(button,a).nstudio-template-primary:hover{background:#254a42 !important;color:#fff !important;-webkit-text-fill-color:#fff !important}
.nstudio-template-library-modal :is(button,a).nstudio-template-secondary:hover{background:#f3f7f5;color:#36463f;-webkit-text-fill-color:#36463f}
.nstudio-template-library-modal :is(button,a).nstudio-template-danger:hover{background:#fff3f1;color:#9a3028;-webkit-text-fill-color:#9a3028}
.nstudio-template-library-modal :is(button,a).nstudio-template-primary.small,.nstudio-template-library-modal :is(button,a).nstudio-template-secondary.small,.nstudio-template-library-modal :is(button,a).nstudio-template-danger.small{min-height:32px;padding:6px 9px;font-size:11px}
.nstudio-template-library-browser{padding:18px 20px 24px}.nstudio-template-product-tabs,.nstudio-template-category-tabs{display:flex;flex-wrap:wrap;gap:7px}.nstudio-template-product-tabs{margin-bottom:10px}.nstudio-template-category-tabs{padding-top:10px;border-top:1px solid #e6ebe8}
.nstudio-template-library-modal button.nstudio-template-chip{all:revert;box-sizing:border-box;appearance:none;display:inline-flex;align-items:center;min-height:34px;border:1px solid #cfd8d4;border-radius:999px;background:#fff;color:#4c5b55;padding:7px 12px;font:inherit;font-size:12px;font-weight:750;cursor:pointer}.nstudio-template-library-modal button.nstudio-template-chip.is-active{border-color:#315f55;background:#edf5f2;color:#315f55}
.nstudio-template-library-modal .nstudio-template-more-wrap{display:flex;justify-content:center;margin:20px 0 4px}
.nstudio-template-library-modal button.nstudio-template-more{all:revert;box-sizing:border-box;appearance:none;display:inline-flex;align-items:center;justify-content:center;min-height:39px;padding:8px 24px;border:1px solid #315f55;border-radius:8px;background:#fff;color:#315f55;-webkit-text-fill-color:#315f55;font-family:inherit;font-size:13px;font-weight:700;line-height:1.4;cursor:pointer}
.nstudio-template-library-modal button.nstudio-template-more:hover{background:#edf5f2;color:#315f55;-webkit-text-fill-color:#315f55}
.nstudio-template-library-list{margin-top:18px}.nstudio-template-group+.nstudio-template-group{margin-top:24px}.nstudio-template-group h4{margin:0 0 9px;font-size:14px}.nstudio-template-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px}.nstudio-template-card{overflow:hidden;border:1px solid #dce3e0;border-radius:10px;background:#fff}.nstudio-template-card-image{aspect-ratio:1.25/1;display:flex;align-items:center;justify-content:center;background:#eeeeee}.nstudio-template-card-image img{display:block;width:100%;height:100%;object-fit:contain}.nstudio-template-card-body{display:grid;gap:5px;padding:10px}.nstudio-template-card-body strong{font-size:12px;line-height:1.45}.nstudio-template-card-body>span{font-size:11px;color:#78837f}.nstudio-template-card-actions{display:flex;flex-wrap:wrap;gap:5px;margin-top:4px}.nstudio-template-empty{padding:34px 12px;text-align:center;color:#7a8580;font-size:12px}

.nstudio-template-library-modal.is-parent-overlay{padding:18px}
.nstudio-template-library-modal.is-parent-overlay .nstudio-template-library-dialog{width:min(1480px,97vw);max-height:94vh}
.nstudio-template-library-modal.is-parent-overlay .nstudio-template-library-browser{padding:20px 24px 28px}
.nstudio-template-library-modal.is-parent-overlay .nstudio-template-grid{grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:16px}
.nstudio-template-library-modal.is-parent-overlay .nstudio-template-card-body{padding:12px}
.nstudio-template-library-modal.is-parent-overlay .nstudio-template-card-body strong{font-size:13px}
.nstudio-template-library-modal.is-busy .nstudio-template-library-dialog{cursor:progress}
/* Distinct category sections in the "All" template view. */
.nstudio-template-library-modal .nstudio-template-group+.nstudio-template-group{margin-top:32px;padding-top:24px;border-top:2px solid #d7e3dd}
.nstudio-template-library-modal .nstudio-template-group>h4{display:flex;align-items:center;min-height:46px;margin:0 0 16px;padding:10px 15px;border-left:5px solid #477d70;border-radius:0 8px 8px 0;background:#edf4f0;color:#284b40;font-size:18px;font-weight:800;line-height:1.4}
@media(max-width:640px){.nstudio-template-library-modal{padding:8px}.nstudio-template-library-dialog{width:100%;max-height:95vh;border-radius:11px}.nstudio-template-library-head{padding:14px}.nstudio-template-library-save,.nstudio-template-library-browser{padding:14px}.nstudio-template-grid{grid-template-columns:1fr 1fr}.nstudio-template-card-actions{display:grid}.nstudio-template-primary.small,.nstudio-template-secondary.small,.nstudio-template-danger.small{width:100%}}
/* In the parent-page overlay the desktop grid rule has higher specificity. */
@media(max-width:640px){
  .nstudio-template-library-modal.is-parent-overlay .nstudio-template-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .nstudio-page.is-nstudio-embed .nstudio-column-heading-spec{display:flex;align-items:center;justify-content:space-between;gap:8px}
  .nstudio-page.is-nstudio-embed .nstudio-column-heading-spec .nstudio-column-heading-copy{flex:0 0 auto}
  .nstudio-page.is-nstudio-embed .nstudio-embed-template-btn{flex:0 1 auto;min-width:0;max-width:calc(100% - 78px);margin-left:auto;margin-right:0;padding:7px 9px;font-size:11px;gap:5px}
  .nstudio-page.is-nstudio-embed .nstudio-embed-template-btn span{min-width:0;overflow:hidden;text-overflow:ellipsis}
}
.nstudio-template-new-category{display:grid;gap:12px;padding:12px;border:1px solid #e1e7e4;border-radius:10px;background:#f8faf9}.nstudio-template-new-category[hidden]{display:none}.nstudio-template-field small{font-size:11px;line-height:1.5;color:#78847f}
