.studio-template-open{max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;border:1px solid #a99ae6;border-radius:10px;background:#f1edff;color:#3d2b89;padding:10px 14px;min-height:44px;font-weight:650}
.studio-template-dialog{width:min(1120px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:0;border:1px solid #d6dce5;border-radius:18px;color:#172f46;background:#fff;overflow:auto;box-shadow:0 24px 90px #10203540;font-size:16px}.studio-template-dialog::backdrop{background:#10203570}.studio-template-dialog *{box-sizing:border-box;min-width:0}.studio-template-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 22px;border-bottom:1px solid #e0e5ed;position:sticky;top:0;background:#fff;z-index:2}.studio-template-head h2{font-size:24px;margin:0;overflow-wrap:anywhere}.studio-template-dialog button{min-height:44px;border:1px solid #d3dae6;border-radius:9px;padding:8px 12px;background:#fff;color:#172f46;white-space:normal;overflow-wrap:anywhere;font:inherit;cursor:pointer}.studio-template-dialog button:disabled{opacity:.5;cursor:default}.studio-template-dialog button:focus-visible,.studio-template-dialog input:focus-visible,.studio-template-dialog select:focus-visible{outline:3px solid #9a82ee;outline-offset:2px}.studio-template-intro{margin:0;padding:16px 22px;color:#536579;line-height:1.5}.studio-template-body{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:24px;padding:0 22px 22px}.studio-template-filters{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:12px}.studio-template-dialog label{display:flex;flex-direction:column;gap:7px;font-size:14px;color:#354861}.studio-template-dialog input,.studio-template-dialog select{width:100%;max-width:100%;min-height:44px;border:1px solid #b8c5d9;border-radius:8px;background:#fff;color:#172f46;padding:9px;font:inherit}.studio-template-count{font-size:14px;color:#536579}.studio-template-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.studio-template-dialog .studio-template-card{padding:7px;text-align:start;display:flex;flex-direction:column;gap:9px;font-size:13px;line-height:1.35}.studio-template-card canvas{width:100%;height:auto;display:block;border-radius:5px}.studio-template-card span{overflow-wrap:anywhere}.studio-template-dialog .studio-template-card[aria-pressed=true]{border:2px solid #6045c8;background:#f6f2ff;padding:6px}.studio-template-pagination{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:16px}.studio-template-preview{display:flex;flex-direction:column;align-self:start;gap:14px;border:1px solid #e0e5ed;border-radius:12px;padding:15px;background:#f9fafc}.studio-template-preview h3{margin:0;font-size:21px;overflow-wrap:anywhere}.studio-template-preview>canvas{width:100%;height:auto;display:block;border-radius:8px}.studio-template-preview p{margin:0;line-height:1.5;overflow-wrap:anywhere;font-size:14px}.studio-template-preview .primary{background:#5940bc;color:#fff;border-color:#5940bc;font-weight:700}.studio-template-action-hint{color:#596b83}.studio-template-status{font-weight:600}.studio-length-presets,.album-template-navigation{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:14px}.studio-length-presets button{min-height:44px}.viewer-card #viewer-content[data-view-profile=reading] pre{white-space:pre-wrap;overflow-wrap:anywhere;font-family:system-ui,sans-serif;line-height:1.7}.viewer-card #viewer-content[data-view-profile=code] pre{white-space:pre;tab-size:4;font-family:monospace}.viewer-card #viewer-content[data-view-profile=large]{font-size:24px;line-height:1.7}.viewer-card #viewer-content[data-view-profile=large] pre{white-space:pre-wrap;overflow-wrap:anywhere}.viewer-card #viewer-content[data-view-profile=contrast]{background:#101c2b;color:#fff}.viewer-card #viewer-content[data-view-profile=contrast] td,.viewer-card #viewer-content[data-view-profile=contrast] th{background:#101c2b;color:#fff}.viewer-card #viewer-content[data-view-profile=contrast] pre{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:760px){.studio-template-body{grid-template-columns:minmax(0,1fr);padding:0 14px 18px;gap:18px}.studio-template-head{padding:14px;gap:8px}.studio-template-head h2{font-size:20px}.studio-template-intro{padding:14px}.studio-template-filters{grid-template-columns:minmax(0,1fr)}.studio-template-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.studio-template-preview{order:-1}.studio-template-preview>canvas{max-height:210px;object-fit:contain}.studio-template-preview{gap:10px}.studio-template-pagination{flex-wrap:wrap}.studio-template-pagination span{font-size:14px}}
@media print{.studio-template-open,.studio-template-dialog,.studio-length-presets{display:none!important}}

.studio-template-preview{scroll-margin-top:90px}

.album-studio-top>#studio-templates-open{display:inline-flex;align-items:center;font-size:13px;padding:8px 10px;min-height:40px}

.studio-template-favorite-filter{display:flex!important;align-items:center;gap:8px;min-width:0;flex-wrap:wrap}.studio-template-favorite-filter input[type=checkbox]{width:22px!important;min-width:22px;max-width:22px;height:22px;padding:0;flex:0 0 22px}.studio-template-favorite-filter span{overflow-wrap:anywhere}#studio-template-favorite[aria-pressed=true]{background:#f0edff;color:#513cba}
