.template-site{min-height:100dvh;background:var(--background);color:var(--foreground)}.template-library{max-width:1600px;margin:auto;padding:32px 36px 60px}.template-detail a,.template-detail button,.template-library a,.template-library button{cursor:pointer}.template-detail :focus-visible,.template-library :focus-visible{outline:2px solid var(--ring);outline-offset:3px}.template-library-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:24px}.template-library-heading h1{font-size:30px;font-weight:700}.template-search{display:flex;align-items:center;gap:10px;max-width:440px;width:100%;border:1px solid var(--border);background:var(--card);padding:10px 14px;border-radius:12px}.template-search input{width:100%;min-width:0;background:transparent;outline:none;font-size:14px}.template-business{display:flex;gap:12px;margin-bottom:24px}.template-business :is(button,a){display:flex;align-items:center;justify-content:center;gap:10px;min-height:54px;padding:10px 22px;border:1px solid var(--border);border-radius:12px;background:linear-gradient(120deg,#972ce414,#2b5dea0a);font-size:14px}.template-business [aria-pressed=true]{border-color:#a649db;color:var(--primary)}.template-filterbar{display:flex;justify-content:space-between;align-items:center;gap:16px}.template-filterbar nav{display:flex;gap:8px;overflow-x:auto}.template-filterbar button,.template-kinds button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 16px;border-radius:10px;white-space:nowrap;font-size:13px}.template-filterbar [aria-pressed=true]{background:linear-gradient(115deg,#8f32dc,#c72a8d);color:white}.template-kinds{display:flex;align-items:center;gap:8px;border-bottom:1px solid var(--border);margin:12px 0 24px;padding-bottom:8px}.template-kinds [aria-pressed=true]{background:var(--muted);color:var(--foreground)}.template-kinds span{margin-left:auto;color:var(--muted-foreground);font-size:12px}.template-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:24px 16px}.template-card{min-width:0}.template-poster{position:relative;aspect-ratio:9/16;border-radius:12px;background:var(--card);isolation:isolate}.template-preview{display:block;width:100%;height:100%;overflow:hidden;border-radius:inherit}.template-preview img{width:100%;height:100%;object-fit:cover;transition:transform .2s}.template-card:hover .template-preview img{transform:scale(1.025)}.template-placeholder{display:flex;align-items:center;justify-content:center;flex-direction:column;width:100%;height:100%;gap:14px;padding:14px;text-align:center;background:linear-gradient(150deg,#972ce41f,#2b5dea12);border-radius:12px}.template-placeholder strong{font-size:16px}.template-placeholder small{font-size:12px;color:var(--muted-foreground);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.template-favorite{position:absolute;right:5px;top:5px;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;color:white;background:#0006;opacity:0;pointer-events:none;transition:opacity .18s;z-index:2}.template-favorite.saved{opacity:1;color:#e6c4ff}.template-hover-action{position:absolute;left:0;right:0;bottom:0;padding:28px 8px 12px;background:linear-gradient(transparent,#0009);border-radius:0 0 12px 12px;display:flex;justify-content:center;opacity:0;pointer-events:none;transition:opacity .18s}.template-hover-action button,.template-primary{background:linear-gradient(115deg,#8f32dc,#c72a8d);color:white;border-radius:22px;padding:10px 18px;min-height:44px;font-size:13px;text-align:center}.template-card:is(:hover,:focus-within) :is(.template-favorite,.template-hover-action){opacity:1;pointer-events:auto}.template-card-title{display:block;text-align:left;font-size:14px;font-weight:600;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-top:10px;min-height:40px}.template-card>small{font-size:12px;color:var(--muted-foreground)}.template-empty{text-align:center;padding:60px 20px;color:var(--muted-foreground)}.template-detail{width:min(920px,calc(100vw - 32px))!important;max-width:920px!important;max-height:calc(100dvh - 32px);overflow:auto;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;padding:28px!important;background:var(--background)!important;color:var(--foreground)}.template-detail-media{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;gap:10px}.template-detail-media :is(video,img){max-height:70dvh;max-width:100%;object-fit:contain;border-radius:12px}.template-detail-media>.template-placeholder{min-height:360px}.template-detail-media>a{font-size:13px;color:var(--muted-foreground)}.template-detail-info{display:flex;flex-direction:column;gap:18px;padding-top:20px;min-width:0}.template-detail-info>p{color:var(--muted-foreground);font-size:14px;line-height:1.6}.template-detail-star{display:flex;align-items:center;gap:8px;align-self:flex-start;min-height:44px}.template-detail-info label{font-size:13px}.template-detail textarea{display:block;width:100%;min-height:110px;background:var(--card);border:1px solid var(--border);border-radius:10px;padding:12px;margin-top:8px;resize:vertical}.template-detail footer{margin-top:auto;display:flex;flex-direction:column;gap:12px}.template-detail footer small{font-size:12px;color:var(--muted-foreground)}.template-detail .template-primary{display:block;font-size:15px}.template-detail button:disabled{opacity:.5;cursor:wait}@media(min-width:1000px){.template-library-heading{background:radial-gradient(ellipse at 50% 0,#972ce41a,transparent 65%);padding-bottom:12px}}@media(max-width:1200px){.template-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}@media(max-width:900px){.template-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.template-library{padding:24px}.template-business :is(a,button){flex:1;padding:10px}}@media(max-width:650px){.template-library{padding:18px 12px 24px}.template-library-heading{display:block;margin-bottom:16px}.template-library-heading h1{font-size:23px;margin-bottom:12px}.template-search{max-width:none}.template-business{gap:6px;margin-bottom:14px}.template-business :is(a,button){flex-direction:column;gap:6px;font-size:11px;min-width:0;min-height:68px;padding:8px 3px}.template-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 8px}.template-card-title{font-size:12px;padding-top:6px;min-height:32px}.template-card>small{font-size:10px}.template-poster{border-radius:8px}.template-filterbar{align-items:stretch;flex-wrap:wrap;gap:0}.template-filterbar nav{flex:1;min-width:0}.template-filterbar button{padding:8px 10px;font-size:12px}.template-filterbar>button{font-size:11px}.template-kinds{gap:0;margin:6px 0 16px}.template-kinds button{padding:6px 12px;font-size:12px}.template-placeholder{gap:10px;padding:10px}.template-placeholder strong{font-size:13px}.template-placeholder small{font-size:11px}.template-detail{width:calc(100vw - 16px)!important;max-height:calc(100dvh - 16px);grid-template-columns:1fr;gap:14px;padding:20px 16px!important}.template-detail-media :is(video,img){max-height:44dvh}.template-detail-media>.template-placeholder{min-height:200px}.template-detail-info{padding-top:0;gap:10px}.template-detail footer{position:sticky;bottom:-20px;padding:12px 0;background:var(--background)}.template-detail textarea{min-height:80px}}@media(hover:none){.template-favorite{opacity:1;pointer-events:auto;width:32px;height:32px;min-height:44px;min-width:44px}.template-hover-action{display:none}}@media(prefers-reduced-motion:reduce){.template-favorite,.template-hover-action,.template-preview img{transition:none}.template-card:hover .template-preview img{transform:none}}.template-view{display:flex;gap:8px;margin:16px 0}.template-view button{min-height:44px;padding:8px 16px;border-radius:12px;font-weight:600}.template-view button[aria-pressed=true]{background:var(--muted)}.template-grid[data-view=applications]{grid-template-columns:repeat(4,minmax(0,1fr))}.template-grid[data-view=applications] .template-poster{aspect-ratio:auto;height:110px}.template-grid[data-view=applications] .template-placeholder{flex-direction:row;justify-content:flex-start;text-align:left;padding:18px;gap:12px}.template-grid[data-view=applications] .template-placeholder svg{flex:none;width:24px;height:24px}.template-grid[data-view=applications] .template-card-title,.template-grid[data-view=applications] .template-placeholder small{display:none}.template-grid[data-view=applications] .template-card>small{display:block;padding:6px 2px}.template-grid[data-view=applications] .template-favorite{top:0;right:0}@media(max-width:650px){.template-grid[data-view=applications]{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.template-grid[data-view=applications] .template-poster{height:88px}.template-grid[data-view=applications] .template-placeholder{padding:12px;gap:8px}.template-grid[data-view=applications] .template-placeholder strong{font-size:13px}.template-grid[data-view=applications] .template-favorite{position:static;width:44px;float:right;margin-top:-6px;background:transparent;color:var(--muted-foreground)}}.template-toolbar{display:flex;align-items:center;gap:12px;margin:12px 0 20px;min-width:0}.template-toolbar .template-view{margin:0;flex:none}.template-filter-menu{display:contents}.template-filter-menu>.template-filter-toggle{display:none}.template-filter-options{display:flex!important;align-items:center;gap:10px}.template-filter-options :is(select,button,a){display:flex;align-items:center;gap:6px;min-height:44px;padding:8px 12px;border:1px solid var(--border);border-radius:10px;background:var(--background);color:var(--foreground);font-size:13px;white-space:nowrap}.template-filter-options button[aria-pressed=true]{background:var(--muted);color:var(--primary)}.template-result-count{margin-left:auto;font-size:12px;color:var(--muted-foreground);white-space:nowrap}@media(max-width:900px){.template-filter-options,.template-toolbar{gap:6px}.template-filter-options :is(select,button,a){padding:8px;font-size:12px}.template-toolbar .template-view button{padding:8px 10px}}@media(max-width:650px){.template-toolbar{position:relative;margin:8px 0 14px;justify-content:space-between}.template-filter-menu{display:block;position:relative;margin-left:auto}.template-filter-menu>.template-filter-toggle{display:flex;align-items:center;justify-content:center;min-width:64px;min-height:44px;padding:8px 10px;border-radius:10px;background:var(--muted);font-size:13px;list-style:none}.template-filter-menu>.template-filter-toggle::-webkit-details-marker{display:none}.template-filter-menu:not(.is-open)>.template-filter-options{display:none!important}.template-filter-options{position:absolute;top:48px;right:0;width:240px;max-width:calc(100vw - 24px);z-index:20;padding:12px;display:grid!important;grid-template-columns:1fr;box-shadow:0 12px 30px #0003;border:1px solid var(--border);background:var(--background);border-radius:14px}.template-result-count{display:none}.template-library-heading{display:flex;align-items:center;gap:12px;margin-bottom:10px}.template-library-heading h1{font-size:20px;white-space:nowrap;margin:0}.template-search{flex:1;min-width:0}.template-search input{min-width:0;width:100%;font-size:13px}.template-library{padding-top:12px}}