/* Finished sheet browsing stays light: lazy raster cards and local slot overlays. */
.template-home{max-width:1520px;margin:auto;padding:44px 40px 64px}.template-home-heading{display:flex;align-items:center;justify-content:space-between;gap:28px;margin-bottom:32px}.template-eyebrow{font-size:10px;letter-spacing:1.6px;font-weight:700;color:#ab4a20;margin-bottom:12px}.template-home h1{font-size:clamp(28px,3.2vw,42px);font-weight:600;letter-spacing:-1.5px;line-height:1.15}.template-home-subtitle{margin-top:13px;color:#637080;font-size:16px;line-height:1.5}.template-home-actions{display:flex;gap:10px;flex-shrink:0;flex-wrap:wrap}.template-home-actions .button{white-space:nowrap}.template-filters{display:flex;align-items:center;gap:22px;margin-bottom:20px}.template-filters input{max-width:290px;background:#fff}.template-categories{display:flex;gap:7px;overflow-x:auto;padding:4px;scrollbar-width:thin}.template-category{border:1px solid #dce1e7;border-radius:24px;background:transparent;color:#5d6878;font-size:13px;padding:8px 14px;white-space:nowrap}.template-category[aria-pressed=true]{background:#302924;border-color:#302924;color:#fff}.template-category:hover{border-color:#a6826d}.template-results-status{color:#667180;font-size:13px;min-height:18px;margin:0 0 18px}.template-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:22px}.template-card{border:1px solid #e1e4e8;border-radius:16px;overflow:hidden;background:#fff;content-visibility:auto;contain-intrinsic-size:auto 420px;box-shadow:0 3px 14px #25304004}.template-card-image{display:flex;align-items:center;justify-content:center;border:0;background:#f3f0ec;width:100%;aspect-ratio:4/3;padding:22px;overflow:hidden}.template-card-image img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 3px 5px #29334217)}.template-card-image:hover{background:#ede7df}.template-card-body{padding:19px}.template-card-body h3{font-size:18px;margin:10px 0 7px;line-height:1.25;letter-spacing:-.3px}.template-card-meta{display:flex;justify-content:space-between;align-items:center;gap:8px;color:#8b6550;font-size:11px;font-weight:650}.template-card-description{font-size:13px;line-height:1.5;color:#647080;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:39px}.template-card-fields{font-size:12px;color:#78808b;margin:11px 0 16px}.template-card-body>.button{width:100%;justify-content:center;min-height:40px}.template-card-placeholder{color:#8b8278;font-size:15px}.template-more{display:block;margin:26px auto 0}.template-status{padding:4px 7px;border-radius:6px;background:#f1ede8;color:#816b51;font-size:10px}.template-status-published{background:#e9f4ed;color:#35704b}.template-save-button{margin-left:auto;white-space:nowrap}.template-dialog{width:min(1080px,calc(100vw - 36px));max-width:1080px;padding:25px;border:1px solid #e2e4e8;border-radius:18px;max-height:calc(100dvh - 40px);overflow:auto}.template-dialog .dialog-heading{margin-bottom:22px}.template-dialog .dialog-heading h2{font-size:23px;font-weight:550;letter-spacing:-.6px}.template-dialog .icon-button{font-size:23px}.template-use-layout,.template-builder-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr);gap:30px;align-items:start}.template-preview-frame{padding:25px;background:#eeeae4;border-radius:12px;overflow:hidden}.template-preview-paper{position:relative;width:100%;overflow:hidden;background:#fff;box-shadow:0 3px 12px #242b391c;isolation:isolate}.template-preview-base{display:block;width:100%;height:100%;position:absolute;inset:0;object-fit:contain;pointer-events:none}.template-preview-caption{font-size:11px;color:#7b8390;line-height:1.4;margin:12px 0;text-align:center}.template-use-controls,.template-builder-controls{min-width:0}.template-use-description{font-size:16px;line-height:1.55;margin-bottom:14px}.template-use-intro{font-size:14px;line-height:1.55;color:#677280;margin-bottom:22px}.template-field{margin-bottom:18px}.template-field label{font-size:13px}.template-field textarea{min-height:68px}.template-field input[type=file]{display:block;width:100%;font-size:12px;background:#f7f8fa;border:1px dashed #c6cdd7;padding:12px;border-radius:9px;color:#667381;overflow:hidden}.template-upload-status{font-size:12px;color:#7a8491;line-height:1.5;margin-top:7px;overflow-wrap:anywhere}.template-use-controls>.button{width:100%;margin:18px 0 11px}.template-use-controls .field-help{line-height:1.5}.template-replacement{position:absolute;display:flex;align-items:center;justify-content:center;overflow:hidden;pointer-events:none}.template-replacement img{position:absolute;left:50%;top:50%;object-fit:contain;display:block;transform-origin:center}.template-slot-placeholder{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border:1px dashed #c98e6d;background:#fff6e9;color:#a06643;font-size:clamp(7px,1.1vw,12px);font-weight:600;text-align:center;padding:3px;overflow:hidden}.template-admin-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.template-admin-toolbar .field-help{font-size:14px;line-height:1.5;max-width:600px}.template-admin-toolbar .button{flex-shrink:0}.template-admin-filters{display:flex;gap:12px;margin-bottom:20px}.template-admin-filters select{max-width:200px}.template-builder-help{font-size:13px;line-height:1.6;color:#667381;margin:0 0 14px}.template-select-item{position:absolute;border:2px solid transparent;padding:0;background:transparent;border-radius:5px;min-width:0;min-height:0;color:#fff}.template-select-item:hover{border-color:#a37961;background:#bd4a1210}.template-select-item.is-replace{border-color:#bd723f;border-style:dashed}.template-select-item.is-selected{border:3px solid #315aff;background:#315aff12;z-index:2}.template-item-badge{position:absolute;bottom:2px;left:2px;max-width:calc(100% - 4px);font-size:9px;line-height:1.15;background:#3b3f44d6;border-radius:3px;padding:3px 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none;opacity:0}.template-select-item.is-replace .template-item-badge{opacity:1;background:#9b582cd9}.template-select-item.is-selected .template-item-badge,.template-select-item:hover .template-item-badge,.template-select-item:focus-visible .template-item-badge{opacity:1}.template-selection{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap;margin:16px 0}.template-selection-count{font-size:12px;color:#687483;flex-basis:100%;margin-bottom:2px;line-height:1.5}.template-selection .template-slot-picker{flex:1 1 150px;max-width:240px;margin:0}.template-slot-picker label{font-size:11px;line-height:1.4}.template-selection select{width:100%;min-width:0;padding:8px 10px;font-size:12px}.template-selection .button{font-size:12px;white-space:nowrap;padding:9px 11px;min-height:36px}.template-slot-heading{display:flex;justify-content:space-between;gap:10px;align-items:center;margin:23px 0 10px}.template-slot-heading h3{font-size:14px;margin:0}.template-text-button{background:transparent;border:0;color:#a54b20;font-size:12px;padding:7px 2px;text-decoration:underline;text-underline-offset:3px}.template-upload-name-label{font-size:11px;color:#687483;margin:0 0 7px}.template-slot-field{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:6px;align-items:center;margin-bottom:9px}.template-slot-field input{padding:9px;font-size:12px}.template-slot-count{font-size:11px;color:#7a8290;white-space:nowrap}.template-builder-controls>.field-help{line-height:1.6;margin-top:10px}.template-builder-status{font-size:12px;line-height:1.5;color:#78828d;margin-top:18px}.template-builder-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:13px}.template-builder-actions .button{font-size:12px;justify-content:center}.template-builder-actions>.primary{grid-column:1/-1}.template-home-error .button{margin-left:14px}.template-dialog .error{font-size:13px;line-height:1.5;margin-top:14px}
@media(min-width:1000px){.template-builder-visual,.template-use-preview{position:sticky;top:0}.template-builder-dialog{max-height:calc(100dvh - 36px)}}
@media(max-width:900px){.template-home{padding:30px 24px 48px}.template-home-heading{align-items:flex-start}.template-home-actions{flex-direction:column}.template-filters{align-items:stretch;flex-direction:column;gap:12px}.template-filters input{max-width:none}.template-use-layout,.template-builder-layout{gap:20px;grid-template-columns:minmax(0,1.2fr) minmax(235px,1fr)}.template-grid{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}}
@media(max-width:650px){.template-home{padding:25px 16px 42px}.template-home-heading{display:block;margin-bottom:23px}.template-home h1{font-size:32px}.template-home-subtitle{font-size:14px}.template-home-actions{margin-top:20px;flex-direction:row}.template-home-actions .button{flex:1;font-size:13px}.template-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.template-card-image{padding:11px}.template-card-body{padding:13px}.template-card-body h3{font-size:15px;margin-top:8px}.template-card-description{display:none}.template-card-fields{font-size:11px;line-height:1.4;margin:8px 0 12px}.template-card-body>.button{font-size:12px;padding:8px;min-height:38px}.template-card-meta{font-size:10px}.template-dialog{width:calc(100vw - 20px);padding:19px;max-height:calc(100dvh - 20px)}.template-use-layout,.template-builder-layout{display:flex;flex-direction:column;gap:20px}.template-use-preview,.template-builder-visual,.template-use-controls,.template-builder-controls{width:100%}.template-preview-frame{padding:18px}.template-use-preview .template-preview-frame{max-width:440px;margin:auto}.template-dialog .dialog-heading h2{font-size:21px}.template-selection .button{font-size:13px}.template-slot-placeholder{font-size:10px}.template-admin-toolbar{display:block}.template-admin-toolbar .button{margin-top:12px}.template-admin-filters{flex-direction:column}.template-admin-filters select{max-width:none}.template-save-button{font-size:11px;padding:7px}.template-dialog .template-select-item{min-height:0;min-width:0}.template-builder-actions .button{font-size:13px}}
@media(prefers-reduced-motion:reduce){.template-home *,.template-dialog *{scroll-behavior:auto;transition:none}}

/* Each recipe uses one finished visual, never an approximate sheet drawing. */
.library-starter .template-card-body{display:flex;flex-direction:column}.library-starter .template-card-body>.button{margin-top:auto}
.template-emoji-dialog{max-width:790px}.emoji-filters{display:flex;gap:10px;margin:16px 0}.emoji-filters input{flex:1;min-width:0}.emoji-filters select{width:205px}.emoji-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;max-height:350px;overflow:auto;overscroll-behavior:contain;padding:5px}.emoji-choice{display:grid;place-items:center;aspect-ratio:1;border:2px solid transparent;border-radius:12px;background:#f6f7f9;padding:10px;cursor:pointer}.emoji-choice:hover{background:#fff0df}.emoji-choice[aria-pressed=true]{border-color:#bd4613;background:#fff0df}.emoji-choice img{width:100%;height:100%;max-width:48px;max-height:48px}.emoji-choice:focus-visible{outline:3px solid #445bff;outline-offset:1px}.emoji-selected{display:flex;flex-wrap:wrap;gap:6px;min-height:42px}.emoji-selected-item{display:flex;align-items:center;gap:6px;border:1px solid #e3c8ae;border-radius:24px;background:#fff7ed;padding:6px 9px;cursor:pointer}.emoji-footer{display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid #e6e9ee;padding-top:16px;margin-top:16px}.emoji-footer a{color:inherit}.emoji-footer .field-help{font-size:11px}.template-emoji-dialog>.button.secondary{margin-top:12px}
@media(max-width:650px){.emoji-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;max-height:38vh}.emoji-choice{padding:7px}.emoji-filters{flex-direction:column}.emoji-filters select{width:100%}.emoji-footer{align-items:stretch;flex-direction:column;gap:6px}.emoji-footer .field-help{margin:0}}
/* Keep equivalent Twemoji and Noto choices together in the mixed grid. */
.emoji-filters .emoji-style-filter{width:150px}
.emoji-choice{grid-template-rows:minmax(0,1fr) auto;gap:3px}
.emoji-choice small{font-size:10px;line-height:1.2;color:#667085;font-weight:400}
@media(max-width:650px){.emoji-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.emoji-filters .emoji-style-filter{width:100%}}

/* The reseller library follows the selected four-column visual catalog. */
.template-home{max-width:1520px;padding:30px 60px 64px;color:#172547;overflow-anchor:none}
.template-home-heading{align-items:flex-start;gap:24px;margin-bottom:22px}
.template-home h1{font-size:clamp(26px,2.85vw,40px);font-weight:650;letter-spacing:-1.3px;line-height:1.2}
.template-home-subtitle{font-size:16px;margin-top:6px;color:#62728c}
.template-home-actions{padding-top:3px}
.template-home .template-filters{display:grid;grid-template-columns:minmax(240px,1.4fr) auto minmax(180px,1fr);align-items:center;gap:18px;margin-bottom:12px}
.template-home .template-filters input{max-width:none;min-width:0;background:#fff;font-size:14px;min-height:42px}
.template-formats{display:flex;align-items:center;gap:9px;white-space:nowrap}
.template-home .template-category{padding:9px 16px;min-height:40px;font-size:13px;color:#52627d;border-color:#dce4ef}
.template-home .template-category[aria-pressed=true]{background:#292929;border-color:#292929;color:#fff}
.template-home .template-use-filter{background:#fff;min-height:42px;font-size:14px;color:#536581;width:100%}
.template-home .template-results-status{font-size:13px;color:#596d8c;margin:0 0 14px}
.template-home .template-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
.template-home .template-card{display:flex;flex-direction:column;border-radius:10px;border-color:#dfe6ef;contain-intrinsic-size:auto 286px;box-shadow:0 2px 8px #26395804}
.template-home .template-card-image{aspect-ratio:2/1;padding:0;background:#edf1f5;flex-shrink:0}
.template-home .template-card-image img{display:block;object-fit:cover;filter:none}
.template-home .template-card-image:not(.starter-art){padding:12px}
.template-home .template-card-image:not(.starter-art) img{object-fit:contain}
.template-home .template-card-body{padding:11px 16px 14px;display:flex;flex-direction:column;flex:1;align-items:flex-start}
.template-home .template-card-body h3{font-size:17px;line-height:1.2;letter-spacing:-.25px;margin:6px 0 4px;color:#162440;overflow-wrap:anywhere}
.template-home .template-card-description{display:block;font-size:13px;line-height:1.4;min-height:36px;max-height:36px;color:#5c6c82;margin:0 0 8px;overflow:hidden}
.template-home .template-card-body>.button{margin-top:auto;min-height:34px;width:100%;padding:6px 10px;font-size:13px;background:#fff;border-color:#e8875b;color:#b84718;font-weight:550}
.template-home .template-card-body>.button:hover{background:#fff6f0;border-color:#bd4a12}
.template-format{display:inline-block;border-radius:4px;padding:3px 6px;font-size:10px;line-height:1.1;font-weight:550;white-space:nowrap}
.template-format-individual{color:#206da1;background:#e0f1ff}
.template-format-sheet{color:#80569b;background:#f1e5fc}
.template-home .template-card-fields{font-size:12px;margin:3px 0 10px}
#template-home-error{margin:0 0 16px;font-size:13px;line-height:1.5}
#template-home-error .button{margin-left:10px;min-height:34px;font-size:12px}
@media(min-width:651px){body:has(.template-home:not([hidden])){overflow:auto}.template-home{min-height:calc(100dvh - 58px)}}
@media(max-width:1180px){.template-home{padding:28px 32px 52px}.template-home .template-filters{grid-template-columns:minmax(220px,1fr) auto;gap:12px}.template-home .template-use-filter{grid-column:1/-1;max-width:320px;margin-left:auto}.template-home .template-grid{gap:16px}.template-home .template-card-body{padding:11px 12px 13px}.template-home .template-card-body h3{font-size:15px}.template-home .template-card-description{font-size:12px;max-height:34px;min-height:34px}}
@media(max-width:900px){.template-home .template-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.template-home .template-filters{grid-template-columns:minmax(0,1fr)}.template-home .template-use-filter{grid-column:auto;max-width:none;margin:0}.template-home .template-formats{justify-content:flex-start}.template-home-actions{flex-direction:row}.template-home h1{font-size:30px}}
@media(max-width:650px){.template-home{padding:24px 16px 42px}.template-home-heading{margin-bottom:20px}.template-home h1{font-size:29px;letter-spacing:-.9px}.template-home-subtitle{font-size:14px;line-height:1.5;margin-top:9px}.template-home-actions{margin-top:16px}.template-home .template-filters{gap:10px}.template-home .template-filters input,.template-home .template-use-filter{min-height:44px;font-size:16px}.template-home .template-formats{gap:6px}.template-home .template-category{min-height:44px;padding:8px 11px;font-size:12px;flex:1}.template-home .template-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.template-home .template-card{contain-intrinsic-size:auto 240px}.template-home .template-card-image{aspect-ratio:2/1}.template-home .template-card-body{padding:10px}.template-home .template-card-body h3{font-size:14px;line-height:1.25;margin:7px 0 5px;min-height:35px}.template-home .template-card-description{display:block;min-height:50px;max-height:50px;font-size:12px;line-height:1.4;margin-bottom:9px}.template-home .template-card-body>.button{min-height:44px;font-size:12px;padding:8px 5px}.template-format{font-size:9px;padding:3px 5px}.template-home .template-results-status{font-size:12px}.template-home .template-card-image:not(.starter-art){padding:8px}}
@media(max-width:350px){.template-home{padding-inline:12px}.template-home .template-formats{flex-wrap:wrap}.template-home .template-category{flex:1 1 auto}.template-home .template-card-body{padding:8px}.template-format{font-size:8px}.template-home .template-grid{gap:9px}}
