/* FILE: assets/css/templates.css */
.template-page{width:min(1240px,calc(100% - 40px));margin:42px auto 80px;color:var(--ui-ink)}
.template-workspace{max-width:1240px;margin:0 auto;color:var(--ui-ink)}
.template-eyebrow{margin:0 0 10px;color:var(--ui-blue);font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase}
.template-hero{display:flex;align-items:end;justify-content:space-between;gap:30px;padding:28px 0 35px;border-bottom:1px solid var(--ui-line)}
.template-hero>div:first-child{max-width:700px}.template-hero h1{margin:0 0 14px;font-size:clamp(30px,4.5vw,49px);font-weight:650;line-height:1.16;letter-spacing:-.035em}
.template-hero p:not(.template-eyebrow){max-width:610px;color:var(--ui-muted);font-size:15px;line-height:1.7}
.template-hero-actions,.template-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.template-hero-actions{justify-content:flex-end;flex-shrink:0}.template-actions .ui-button{min-height:34px;padding:6px 10px;font-size:11px}
.template-filters{display:grid;grid-template-columns:minmax(180px,2fr) repeat(3,minmax(120px,1fr)) auto;align-items:end;gap:12px;padding:22px 0 7px}
.template-filters label,.template-panel label,.template-my-filter label,.template-review-heading label{display:grid;gap:7px;font-size:12px;font-weight:650}
.template-filters input,.template-filters select,.template-panel input:not([type=checkbox]):not([type=radio]),.template-panel select,.template-panel textarea,.template-my-filter select,.template-review-heading select,.template-review-card textarea{width:100%;min-width:0;padding:10px 11px;border:1px solid #cbd5dd;border-radius:6px;background:#fff;color:var(--ui-ink);font-family:inherit;font-size:13px;line-height:1.5}
.template-filters .ui-button{min-height:41px}.template-section{margin-top:41px}.template-section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding-bottom:15px}.template-section-heading h2{margin:0;font-size:22px;font-weight:650}.template-section-heading span{color:var(--ui-muted);font-size:12px}
.template-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.template-card{min-width:0;overflow:hidden;border:1px solid var(--ui-line);border-radius:9px;background:#fff;transition:border-color .15s,transform .15s}.template-card:hover{border-color:#b7cbd8;transform:translateY(-2px)}
.template-card-image,.template-my-image,.template-detail-image{display:flex;align-items:center;justify-content:center;aspect-ratio:4/3;overflow:hidden;background:#f3f5f4;color:#7c8a92;font-size:12px}.template-card-image img,.template-my-image img,.template-detail-image img{width:100%;height:100%;object-fit:cover}
.template-card-content{padding:17px}.template-card-top{display:flex;align-items:center;justify-content:space-between;gap:6px;color:var(--ui-muted);font-size:10px}.template-official{color:#1f5f60;font-weight:700}.template-card h3{margin:10px 0 4px;font-size:16px;line-height:1.35;font-weight:650;overflow-wrap:anywhere}.template-card h3 a{color:var(--ui-ink)}.template-card h3 a:hover{text-decoration:underline}.template-card-creator{margin:0;color:var(--ui-muted);font-size:11px}.template-card-meta{display:flex;justify-content:space-between;gap:8px;margin:18px 0 0;color:var(--ui-muted);font-size:10px}.template-card-price{border-top:1px solid var(--ui-line);padding-top:12px;margin-top:12px;font-size:13px;font-weight:700}
.template-empty{margin-top:16px;padding:25px;border:1px solid var(--ui-line);border-radius:8px;background:#fff;color:var(--ui-muted);font-size:13px}.template-empty a{color:var(--ui-blue)}
.template-pagination{display:flex;align-items:center;justify-content:center;gap:18px;margin-top:25px;font-size:12px;color:var(--ui-muted)}.template-pagination a{color:var(--ui-blue);font-weight:650}.template-pagination button{min-height:31px;padding:4px 10px}
.template-footer{display:flex;justify-content:space-between;gap:20px;width:min(1240px,calc(100% - 40px));margin:0 auto 30px;border-top:1px solid var(--ui-line);padding-top:20px;color:var(--ui-muted);font-size:12px}.template-footer a,.template-back{color:var(--ui-blue)}
.template-back{display:inline-block;margin-bottom:26px;font-size:13px;font-weight:650}.template-detail-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr);gap:40px;align-items:start}.template-detail-image{border:1px solid var(--ui-line);border-radius:10px;background:#fff}.template-detail-image img{object-fit:contain}.template-gallery{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:10px}.template-gallery a{aspect-ratio:4/3;overflow:hidden;border:1px solid var(--ui-line);border-radius:5px}.template-gallery img{width:100%;height:100%;object-fit:cover}.template-detail-copy h1{font-size:clamp(28px,3vw,40px);line-height:1.2;letter-spacing:-.03em;margin:0 0 10px}.template-detail-copy>p{color:var(--ui-muted);font-size:13px;line-height:1.7}.template-detail-price{padding:20px 0;margin:17px 0;border-top:1px solid var(--ui-line);border-bottom:1px solid var(--ui-line);color:var(--ui-ink)!important;font-size:25px!important;font-weight:700}.template-detail-intro{font-size:15px!important}.template-detail-stats{display:flex;gap:22px;padding:12px 0;color:var(--ui-muted);font-size:12px}.template-notice{padding:13px;border:1px solid #d9e3e9;border-radius:7px;background:#f5f9fb}.template-detail-body{max-width:790px;margin:43px 0}.template-detail-body section{border-top:1px solid var(--ui-line);padding:24px 0}.template-detail-body h2{margin:0 0 12px;font-size:18px}.template-detail-body p{white-space:normal;color:var(--ui-muted);font-size:13px;line-height:1.8}.template-chips{display:flex;flex-wrap:wrap;gap:7px}.template-chips span{padding:6px 10px;border:1px solid var(--ui-line);border-radius:30px;background:#fff;font-size:11px}
.template-workspace .ui-page-heading{margin-bottom:22px}.template-workspace .ui-page-heading h1{margin:5px 0 8px}.template-workspace .ui-page-heading p:not(.template-eyebrow){color:var(--ui-muted);font-size:13px}.template-panel{min-width:0;padding:23px;border:1px solid var(--ui-line);border-radius:9px;background:#fff}.template-panel h2{margin:0 0 18px;font-size:17px}.template-panel>p{color:var(--ui-muted);font-size:12px;line-height:1.7}.template-panel label{margin:0 0 17px}.template-panel label small{color:var(--ui-muted);font-size:11px;font-weight:400;line-height:1.5}.template-panel textarea{resize:vertical}.template-panel a{color:var(--ui-blue)}.template-panel .ui-button{color:inherit}.template-creator-layout{display:grid;grid-template-columns:minmax(240px,.7fr) minmax(0,1.3fr);gap:20px;align-items:start}.template-person{display:flex;align-items:center;gap:12px;margin-bottom:15px}.template-person img{width:54px;height:54px;border-radius:50%;object-fit:cover;background:var(--ui-soft)}.template-person strong,.template-person span{display:block}.template-person strong{font-size:14px}.template-person span{margin-top:2px;color:var(--ui-muted);font-size:12px}.template-panel .template-check{display:flex;align-items:flex-start;gap:8px;font-size:12px;font-weight:400}.template-check input{margin-top:3px}.template-status{display:inline-block;padding:5px 8px;border-radius:4px;background:#f0f3f5;color:#586674;font-size:11px;font-weight:700}.template-status-success{background:#eaf6ef;color:#236445}.template-status-error{background:#fff0ed;color:#9a4537}.template-form-status{min-height:1.5em;color:var(--ui-muted);font-size:12px}
.template-editor-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,320px);gap:19px;align-items:start}.template-editor-main,.template-editor-side{display:grid;gap:19px;min-width:0}.template-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.template-sections{padding:0;border:0}.template-sections legend{margin-bottom:10px;font-size:12px;font-weight:650}.template-sections>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.template-sections label{display:flex;align-items:center;gap:6px;margin:0;font-size:11px;font-weight:400}.template-code{font-family:ui-monospace,Consolas,monospace!important;font-size:12px!important;line-height:1.55!important;tab-size:2}.template-help{margin:0 0 16px!important}.template-upload-preview{display:block;width:100%;max-height:210px;object-fit:cover;border-radius:5px;margin:0 0 16px}.template-upload-preview[hidden]{display:none}.template-mini-gallery{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-bottom:12px}.template-mini-gallery img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:4px}.template-required{color:#a04d42;font-size:10px;font-weight:400}.template-radio-group{display:flex;gap:20px}.template-radio-group label{display:flex;align-items:center;gap:6px;font-weight:400}.template-price-input{display:flex;align-items:center;gap:7px}.template-price-input>span{font-weight:700}.template-publish-panel{display:grid;gap:9px}.template-publish-panel p{margin:0 0 7px!important}.template-publish-panel>.ui-button{width:100%;justify-content:center}.template-error{padding:10px 12px;margin-bottom:17px;border:1px solid #e9beba;border-radius:6px;background:#fff4f2;color:#9d3d34;font-size:12px}
.template-my-filter{display:flex;align-items:end;gap:10px;margin:0 0 20px}.template-my-filter select{min-width:180px}.template-my-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.template-my-card{min-width:0;overflow:hidden;border:1px solid var(--ui-line);border-radius:8px;background:#fff}.template-my-image{aspect-ratio:16/9}.template-my-content{padding:17px}.template-my-content h2{margin:9px 0;font-size:17px;line-height:1.35}.template-my-content p,.template-my-content time{display:block;margin:0 0 8px;color:var(--ui-muted);font-size:11px}.template-my-content .template-actions{margin-top:15px}
.template-review-grid{display:grid;grid-template-columns:1fr 1fr;gap:19px;align-items:start}.template-review-heading{display:flex;align-items:end;justify-content:space-between;gap:10px;border-bottom:1px solid var(--ui-line);padding-bottom:15px}.template-review-heading h2{margin:0}.template-review-heading select{min-width:130px}.template-review-list{display:grid;gap:12px;min-height:100px;padding:15px 0;color:var(--ui-muted);font-size:12px}.template-review-card{padding:15px;border:1px solid var(--ui-line);border-radius:6px;color:var(--ui-ink)}.template-review-card-head{display:flex;align-items:center;gap:10px}.template-review-card-head img{width:50px;height:43px;object-fit:cover;border-radius:4px;background:var(--ui-soft)}.template-review-card-head strong,.template-review-card-head small{display:block}.template-review-card-head strong{font-size:13px}.template-review-card-head small{margin-top:3px;color:var(--ui-muted);font-size:11px}.template-review-card p{margin:12px 0;color:var(--ui-muted);font-size:12px;line-height:1.55}.template-review-card>a{display:inline-block;margin:0 0 11px;color:var(--ui-blue);font-size:11px}.template-review-card textarea{margin:7px 0}.template-review-card .template-actions{margin-top:10px}.template-review-note{padding:8px;border-radius:4px;background:#f7f8fa}
@media(max-width:1100px){.template-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.template-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.template-filters .ui-button{justify-self:start}.template-review-grid{grid-template-columns:1fr}}
@media(max-width:780px){.template-hero{align-items:start;flex-direction:column}.template-hero-actions{justify-content:flex-start}.template-grid,.template-my-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.template-detail-grid,.template-editor-grid,.template-creator-layout{grid-template-columns:1fr}.template-sections>div{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.template-page{width:calc(100% - 28px);margin-top:25px}.template-footer{width:calc(100% - 28px)}.template-grid,.template-my-grid,.template-filters,.template-form-grid{grid-template-columns:1fr}.template-hero h1{font-size:32px}.template-section{margin-top:31px}.template-panel{padding:16px}.template-review-heading{align-items:stretch;flex-direction:column}.template-gallery{grid-template-columns:repeat(2,1fr)}}
.template-panel a.ui-button-primary{color:#fff}.template-terms{margin:0 0 16px;padding:11px;border:1px solid var(--ui-line);border-radius:6px;color:var(--ui-muted);font-size:12px;line-height:1.6}.template-terms summary{color:var(--ui-ink);font-weight:650;cursor:pointer}.template-terms ul{margin:11px 0 0;padding-left:18px}.template-terms li{margin:5px 0}.template-my-content .template-rejection-note{padding:8px;border-radius:4px;background:#fff3f0;color:#95483d}
.template-source-review{min-width:0;margin:12px 0;padding:12px;border:1px solid var(--ui-line);border-radius:5px;background:#f7f9fa}.template-source-review[hidden]{display:none}.template-source-review h4{margin:12px 0 5px;font-size:11px}.template-source-review h4:first-child{margin-top:0}.template-source-review pre{max-height:240px;overflow:auto;margin:0;padding:10px;border:1px solid var(--ui-line);border-radius:4px;background:#fff;color:var(--ui-ink);font:11px/1.5 ui-monospace,Consolas,monospace;white-space:pre}
/* FILE: assets/css/templates.css — template detail */
.template-detail{max-width:1180px}.template-detail-grid{grid-template-columns:minmax(0,1.45fr) minmax(300px,.8fr);gap:38px}
.template-detail-image{aspect-ratio:4/3;background:#e9eae6}.template-preview-open{width:100%;height:100%;padding:0;border:0;background:transparent;cursor:zoom-in}.template-preview-open img{width:100%;height:100%;object-fit:contain}
.template-gallery{grid-template-columns:repeat(5,minmax(0,1fr))}.template-gallery-thumb{aspect-ratio:4/3;overflow:hidden;padding:0;border:2px solid var(--ui-line);border-radius:6px;background:#fff;cursor:pointer}.template-gallery-thumb[aria-pressed=true]{border-color:#316a78}.template-gallery-thumb img{width:100%;height:100%;object-fit:cover}
.template-detail-copy{position:sticky;top:22px}.template-detail-copy .template-eyebrow{font-size:11px}.template-detail-copy h1{font-size:clamp(34px,4vw,51px);line-height:1.09}.template-detail-copy>p{margin:8px 0}.template-detail-copy .template-detail-intro{font-size:15px!important;line-height:1.65}.template-detail-price{margin:19px 0;padding:18px 0}.template-detail-stats{flex-wrap:wrap;gap:8px 19px;margin:0 0 18px}.template-cta{display:flex;flex-wrap:wrap;gap:9px}.template-cta .ui-button{min-height:40px}.template-cta #template-apply,.template-cta>.ui-button:disabled:first-child{flex-basis:100%;justify-content:center}.template-cta .template-notice{flex-basis:100%;margin:0}.template-cta [aria-pressed=true],.template-reaction-actions [aria-pressed=true]{border-color:#316a78;background:#e9f3f2;color:#20595b}.template-cta button:disabled{opacity:.62;cursor:not-allowed}
.template-detail-body{max-width:850px;margin-top:50px}.template-detail-body section{padding:30px 0}.template-detail-body h2{font-size:22px;letter-spacing:-.02em}.template-detail-body h3{margin:0 0 14px;font-size:15px}.template-detail-body p{font-size:14px}.template-detail-body a{color:#215e70;text-decoration:underline}.template-creator-name{font-weight:700;color:var(--ui-ink)!important}.template-chips span{font-size:12px}
.template-rating-summary{display:flex;align-items:baseline;gap:12px;margin:8px 0 17px}.template-rating-summary strong{font-size:40px;line-height:1}.template-rating-summary span{font-size:13px;color:var(--ui-muted)}.template-distribution{display:grid;gap:7px;max-width:380px;margin-bottom:26px}.template-distribution>div{display:grid;grid-template-columns:45px 1fr 24px;align-items:center;gap:10px;color:var(--ui-muted);font-size:12px}.template-distribution meter{width:100%;height:13px}
.template-engagement-form{display:grid;gap:12px;max-width:590px;margin:25px 0;padding:20px;border:1px solid var(--ui-line);border-radius:8px;background:#fff}.template-engagement-form label{display:grid;gap:6px;font-size:12px;font-weight:650}.template-engagement-form select,.template-engagement-form textarea{width:100%;padding:10px 11px;border:1px solid #cbd5dd;border-radius:6px;background:#fff;color:var(--ui-ink);font:inherit;font-size:13px}.template-engagement-form textarea{resize:vertical}.template-engagement-form .ui-button{justify-self:start}.template-engagement-form [hidden]{display:none}.template-review-list,.template-story-list{display:grid;gap:12px;margin:22px 0}.template-public-review,.template-story{padding:17px 19px;border:1px solid var(--ui-line);border-radius:8px;background:#fff}.template-review-author{display:flex;align-items:center;gap:10px}.template-review-author img{width:38px;height:38px;border-radius:50%;object-fit:cover}.template-review-author strong,.template-review-author small,.template-story strong,.template-story small{display:block}.template-review-author strong,.template-story strong{font-size:13px}.template-review-author small,.template-story small{margin-top:3px;color:var(--ui-muted);font-size:11px}.template-public-review p,.template-story p{margin:12px 0 0;white-space:pre-line}.template-story-delete{margin-top:12px;padding:0;border:0;background:none;color:#9a4537;font-size:12px;text-decoration:underline;cursor:pointer}
.template-outcomes{display:grid;grid-template-columns:1fr 1fr;gap:10px}.template-outcomes p{margin:0;padding:12px;border:1px solid var(--ui-line);border-radius:7px;background:#fff}.template-disclaimer,.template-small{color:var(--ui-muted)!important;font-size:12px!important}.template-reaction-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:17px}.template-related{margin-top:30px}
.template-lightbox{width:min(92vw,1100px);max-width:none;max-height:90vh;padding:0;border:0;border-radius:9px;background:#101717;color:#fff}.template-lightbox::backdrop{background:rgba(8,16,18,.86)}.template-lightbox-inner{position:relative;display:grid;grid-template-columns:50px minmax(0,1fr) 50px;align-items:center;min-height:55vh;padding:48px 12px 38px}.template-lightbox img{max-width:100%;max-height:76vh;object-fit:contain;margin:auto}.template-lightbox button{border:0;background:transparent;color:#fff;font-size:34px;cursor:pointer}.template-lightbox button:focus-visible,.template-gallery-thumb:focus-visible,.template-preview-open:focus-visible{outline:3px solid #3a91a3;outline-offset:2px}#template-lightbox-close{position:absolute;top:7px;right:12px;z-index:1}#template-lightbox-position{position:absolute;bottom:11px;left:0;width:100%;text-align:center;font-size:12px}
@media(max-width:780px){.template-detail-copy{position:static}.template-detail-grid{grid-template-columns:1fr}.template-outcomes{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.template-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}.template-outcomes{grid-template-columns:1fr}.template-lightbox-inner{grid-template-columns:34px minmax(0,1fr) 34px;padding-left:4px;padding-right:4px}.template-lightbox button{font-size:28px}}
/* FILE: assets/css/templates.css — creator source editor */
.template-editor-page [hidden]{display:none!important}
.template-source-panel{display:grid;gap:16px}
.template-source-heading{display:flex;align-items:start;justify-content:space-between;gap:15px}
.template-source-heading h2{margin:0 0 6px}
.template-source-heading p{margin:0;color:var(--ui-muted);font-size:12px;line-height:1.6}
.template-source-heading a{flex-shrink:0;font-size:12px;font-weight:650}
.template-code-editor{min-width:0;overflow:hidden;border:1px solid #cbd5dd;border-radius:8px;background:#fff}
.template-code-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:42px;padding:6px 10px;border-bottom:1px solid #dce3e8;background:#f6f8fa}
.template-code-toolbar label{display:block;margin:0!important;color:#243947;font-size:12px;font-weight:750}
.template-code-tools{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:5px}
.template-code-tools button{min-height:27px;padding:4px 8px;border:1px solid #d0dce4;border-radius:5px;background:#fff;color:#28546c;font:600 11px/1.2 system-ui,sans-serif;cursor:pointer}
.template-code-tools button:hover{border-color:#8cabb9;background:#eff6f8}
.template-code-tools button:focus-visible{outline:2px solid #276f84;outline-offset:2px}
.template-code-surface{--code-line-height:22px;display:grid;grid-template-columns:52px minmax(0,1fr);height:340px;min-width:0;overflow:hidden}
.template-code-editor[data-language=css] .template-code-surface{height:270px}
.template-code-editor.is-expanded .template-code-surface,.template-code-editor.is-expanded[data-language=css] .template-code-surface{height:min(75vh,760px)}
.template-code-gutter{min-width:0;overflow:hidden;padding:12px 9px 12px 0;border-right:1px solid #dce3e8;background:#f7f9fa;color:#82909c;text-align:right;white-space:pre;user-select:none;font:13px/var(--code-line-height) ui-monospace,Consolas,monospace}
.template-code-gutter>div{will-change:transform}
.template-panel .template-code-surface textarea{display:block;width:100%;height:100%;min-width:0;min-height:0;margin:0;padding:12px 15px;overflow:auto;border:0;border-radius:0;background:#fff;color:#263746;resize:none;white-space:pre;tab-size:2;font:13px/var(--code-line-height) ui-monospace,Consolas,monospace!important;letter-spacing:0}
.template-panel .template-code-surface textarea:focus{outline:2px solid #3a8298;outline-offset:-2px}
.template-panel .template-code-surface textarea::selection{background:#b9dcef;color:#1b3444}
.template-code-footer{display:flex;justify-content:space-between;gap:12px;padding:7px 11px;border-top:1px solid #dce3e8;background:#f6f8fa;color:#667784;font:11px/1.35 system-ui,sans-serif}
.template-code-footer .is-over-limit{color:#b42318;font-weight:700}
.template-code-tip{margin:0!important;color:var(--ui-muted);font-size:11px!important;line-height:1.6!important}
.template-preview-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.template-preview-actions .template-preview-media{display:flex;align-items:center;gap:8px;margin:0;font-size:12px}
.template-panel .template-preview-media select{width:auto;min-width:150px;padding:7px 9px;font-size:12px}
.template-preview-actions span{color:var(--ui-muted);font-size:12px}
#template-source-preview{display:block;width:100%;height:560px;border:1px solid #d0dce4;border-radius:7px;background:#fff}
.template-publish-panel h2{margin-bottom:5px}.template-publish-panel .ui-button-primary{color:#fff}.template-publish-panel #template-edit-status:empty{display:none}
.template-publish-panel progress{display:block;width:100%;height:7px;accent-color:#286448}.template-publish-panel progress[hidden]{display:none}
.template-editor-skeleton{display:grid;gap:13px;max-width:850px;padding:23px;border:1px solid var(--ui-line);border-radius:9px;background:#fff;color:var(--ui-muted);font-size:12px}.template-editor-skeleton i{display:block;height:35px;border-radius:5px;background:#eef2f4}.template-editor-skeleton i:nth-of-type(2){width:78%}.template-editor-skeleton i:nth-of-type(3){width:91%}
@media(max-width:650px){.template-source-heading{display:block}.template-source-heading a{display:inline-block;margin-top:8px}.template-code-toolbar{align-items:flex-start;flex-direction:column}.template-code-tools{justify-content:flex-start}.template-code-surface{grid-template-columns:42px minmax(0,1fr)}.template-code-gutter{padding-right:6px}.template-panel .template-code-surface textarea{padding-left:10px}#template-source-preview{height:430px}}

/* Compact marketplace, product detail, and creator workspace. */
.template-catalog,.template-detail{width:min(1280px,calc(100% - 32px));margin:18px auto 42px}
.template-catalog .template-hero{align-items:center;gap:18px;padding:6px 0 17px}
.template-catalog .template-hero h1{max-width:680px;margin:0 0 5px;font-size:clamp(25px,3vw,34px);line-height:1.18}
.template-catalog .template-hero p:not(.template-eyebrow){margin:0;font-size:13px;line-height:1.45}
.template-catalog .template-eyebrow{margin-bottom:4px}
.template-catalog .template-filters{gap:8px;padding:13px 0 0}
.template-catalog .template-filters label{gap:4px}
.template-catalog .template-filters input,.template-catalog .template-filters select{padding:7px 9px}
.template-catalog .template-filters .ui-button{min-height:36px}
.template-catalog .template-section{margin-top:24px}
.template-catalog .template-section-heading{padding-bottom:9px}
.template-catalog .template-section-heading h2{font-size:18px}
.template-grid{gap:12px}
.template-card{display:flex;flex-direction:column;border-radius:7px;box-shadow:0 1px 2px rgba(21,40,48,.04)}
.template-card-image{aspect-ratio:16/10}
.template-card-content{display:flex;flex:1;flex-direction:column;padding:11px 12px 12px}
.template-card h3{margin:6px 0 2px;font-size:14px}
.template-card-meta{margin:9px 0 0}
.template-card-price{margin-top:auto;padding-top:9px;border-top:0;font-size:14px}
.template-card-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:9px}
.template-card-actions .ui-button{min-height:32px;justify-content:center;padding:5px 7px;font-size:11px}
.template-card-actions button:disabled{opacity:.55;cursor:not-allowed}
.template-card-action-status{color:#236445;font-size:11px;line-height:1.4}
.template-card-action-status:not(:empty){margin-top:8px}
.template-card-action-status a{color:inherit;text-decoration:underline}
.template-detail .template-back{margin-bottom:12px}
.template-detail .template-detail-grid{grid-template-columns:minmax(0,1.35fr) minmax(320px,.8fr);gap:20px}
.template-detail .template-detail-image{aspect-ratio:16/10}
.template-detail .template-gallery{gap:6px;margin-top:7px}
.template-detail .template-detail-copy{position:static}
.template-detail .template-detail-copy h1{margin-bottom:4px;font-size:clamp(27px,3vw,38px)}
.template-detail .template-detail-copy>p{margin:5px 0;line-height:1.5}
.template-detail .template-detail-intro{font-size:13px!important}
.template-detail .template-detail-price{margin:11px 0;padding:9px 0;font-size:22px!important}
.template-detail .template-detail-stats{gap:5px 12px;margin:0 0 11px;padding:2px 0;font-size:11px}
.template-detail .template-cta{gap:7px}
.template-detail .template-cta .ui-button{min-height:34px;padding:6px 10px;font-size:12px}
.template-detail .template-cta #template-apply,.template-detail .template-cta>.ui-button:disabled:first-child{flex-basis:auto}
.template-detail .template-cta .template-detail-preview-button{color:var(--ui-ink)}
.template-detail .template-cta .template-notice{padding:7px 9px;font-size:11px}
.template-detail .template-small{margin:8px 0;font-size:11px!important}
.template-detail .template-detail-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-width:none;margin:24px 0}
.template-detail .template-detail-body section{min-width:0;padding:15px;border:1px solid var(--ui-line);border-radius:7px;background:#fff}
.template-detail .template-detail-body section:nth-child(n+5){grid-column:1/-1}
.template-detail .template-detail-body h2{margin-bottom:7px;font-size:17px}
.template-detail .template-detail-body p{margin:4px 0;font-size:12px;line-height:1.55}
.template-detail .template-chips{gap:5px}
.template-detail .template-chips span{padding:4px 7px;font-size:11px}
.template-detail .template-engagement-form{gap:9px;margin:13px 0;padding:13px}
.template-detail .template-review-list,.template-detail .template-story-list{gap:8px;margin:12px 0}
.template-detail .template-public-review,.template-detail .template-story{padding:11px 13px}
.template-detail .template-related{margin-top:20px}
.template-editor-page{max-width:1360px}
.template-editor-page .ui-page-heading{margin-bottom:13px}
.template-editor-page .ui-page-heading h1{margin:2px 0 3px}
.template-editor-form{min-width:0}
.template-editor-tabs{display:flex;gap:3px;overflow-x:auto;border-bottom:1px solid var(--ui-line);margin-bottom:13px}
.template-editor-tabs button{position:relative;flex:0 0 auto;padding:11px 17px;border:0;background:transparent;color:var(--ui-muted);font-family:inherit;font-size:13px;font-weight:650;line-height:1.3;cursor:pointer}
.template-editor-tabs button[aria-selected=true]{color:var(--ui-ink)}
.template-editor-tabs button[aria-selected=true]::after{position:absolute;right:0;bottom:0;left:0;height:2px;background:#277c84;content:''}
.template-editor-tabs button:hover{color:var(--ui-ink);background:#f4f8f8}
.template-editor-tabs button:focus-visible{outline:2px solid #277c84;outline-offset:-2px}
.template-editor-tab-panel{min-width:0}
.template-personalization-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(235px,300px);gap:12px;align-items:start}
.template-personalization-main,.template-personalization-side{display:grid;gap:12px;min-width:0}
.template-editor-page .template-panel{padding:17px}
.template-editor-page .template-panel h2{margin-bottom:13px}
.template-editor-page .template-panel label{margin-bottom:12px}
.template-editor-page .template-panel input:not([type=checkbox]):not([type=radio]),.template-editor-page .template-panel select,.template-editor-page .template-panel textarea{padding:8px 10px}
.template-editor-page .template-code-toolbar label{margin:0}
.template-editor-page .template-code-surface{height:min(69vh,680px)}
.template-editor-page .template-code-editor[data-language=css] .template-code-surface{height:min(69vh,680px)}
.template-editor-page .template-code-editor.is-expanded .template-code-surface{height:min(82vh,900px)}
.template-editor-page .template-code-surface textarea{padding:12px 15px!important}
.template-editor-page .template-source-panel{gap:12px}
.template-preview-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.template-preview-heading h2{margin:0 0 3px!important}
.template-preview-heading p{margin:0;color:var(--ui-muted);font-size:12px}
.template-live-preview{display:grid;gap:10px}
.template-live-preview #template-source-preview{height:min(72vh,800px)}
#template-source-preview-status{color:var(--ui-muted);font-size:11px}
.template-editor-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:13px;padding:12px 0;border-top:1px solid var(--ui-line)}
.template-editor-actions>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.template-editor-actions .ui-button{min-height:35px;padding:6px 12px}
.template-editor-detail-link{font-size:12px;color:var(--ui-blue)}
.template-editor-actions progress{width:110px;height:7px;accent-color:#286448}
.template-editor-actions #template-edit-status{margin:0;color:var(--ui-muted);font-size:12px}
.template-design-preview{display:flex;flex-direction:column;width:100%;height:100dvh;min-height:400px;margin:0;overflow:hidden;background:#eef2f4}
.template-design-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:58px;padding:8px 18px;border-bottom:1px solid #dce3e8;background:#fff}
.template-design-title,.template-design-controls{display:flex;align-items:center;gap:10px;min-width:0}
.template-design-title>a{display:grid;place-items:center;width:32px;height:32px;border:1px solid var(--ui-line);border-radius:6px;color:var(--ui-ink);text-decoration:none}
.template-design-title strong,.template-design-title span{display:block;overflow:hidden;max-width:260px;text-overflow:ellipsis;white-space:nowrap}
.template-design-title strong{font-size:13px}.template-design-title span{color:var(--ui-muted);font-size:11px}
.template-design-controls form{display:flex;align-items:center;gap:6px;margin:0}
.template-design-controls label{color:var(--ui-muted);font-size:11px}
.template-design-controls select{max-width:160px;padding:6px 8px;border:1px solid #cbd5dd;border-radius:5px;background:#fff;font-size:12px}
.template-design-controls .ui-button{min-height:32px;padding:5px 10px;font-size:11px}
.template-design-status:not(:empty){padding:6px 18px;border-bottom:1px solid #cee4d4;background:#ecf8ef;color:#205f3f;font-size:12px}
.template-design-status a{margin-left:4px;color:inherit;text-decoration:underline}
.template-design-frame{display:block;flex:1;width:100%;min-height:0;border:0;background:#fff}
.template-design-error{width:min(520px,calc(100% - 32px));margin:clamp(30px,9vh,100px) auto;padding:22px;border:1px solid var(--ui-line);border-radius:8px;background:#fff}
.template-design-error h1{margin:0 0 8px;font-size:20px}.template-design-error p{color:var(--ui-muted);font-size:13px}
@media(max-width:800px){.template-personalization-grid,.template-detail .template-detail-grid{grid-template-columns:1fr}.template-detail .template-detail-body{grid-template-columns:1fr}.template-detail .template-detail-body section{grid-column:1/-1}.template-design-toolbar{align-items:flex-start;flex-wrap:wrap}.template-design-controls{flex-wrap:wrap}}
@media(max-width:520px){.template-catalog,.template-detail{width:calc(100% - 24px);margin-top:12px}.template-catalog .template-hero{align-items:flex-start}.template-catalog .template-hero h1{font-size:25px}.template-catalog .template-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.template-catalog .template-filters label:first-child{grid-column:1/-1}.template-catalog .template-filters .ui-button{grid-column:1/-1;justify-self:stretch}.template-grid{gap:9px}.template-card-content{padding:9px}.template-card-actions{grid-template-columns:1fr}.template-card-actions .ui-button{width:100%}.template-editor-tabs button{padding:10px 12px;font-size:12px}.template-editor-page .template-panel{padding:12px}.template-editor-page .template-code-surface textarea{padding-left:10px!important}.template-preview-heading{align-items:flex-start;flex-direction:column}.template-live-preview #template-source-preview{height:60vh}.template-design-toolbar{padding:7px 10px}.template-design-title strong{max-width:180px}.template-design-controls{width:100%}.template-design-controls form{flex:1}.template-design-controls .ui-button{flex:1;justify-content:center}}
