.template-page { padding-top: var(--space-8); padding-bottom: var(--space-10); }
.template-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-6); margin-bottom: var(--space-6); }
.template-hero h1 { margin: var(--space-3) 0 var(--space-2); font-size: clamp(28px, 4vw, 44px); letter-spacing: -.035em; }
.template-hero p { max-width: 680px; margin: 0; color: var(--muted); line-height: 1.7; }
.template-guide { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); margin-bottom: var(--space-8); }
.template-guide div { display: grid; gap: 4px; }
.template-guide span { color: var(--muted); font-size: var(--text-sm); line-height: 1.6; }
.template-section { margin-top: var(--space-8); }
.deck-template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--space-4); }
.deck-template-card { overflow: hidden; padding: 0; }
.deck-template-preview { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, var(--bg), var(--surface)); cursor: zoom-in; }
.deck-template-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.deck-template-preview .template-no-preview { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); font-size: var(--text-xs); }
.deck-template-body { display: grid; gap: var(--space-2); padding: var(--space-4); }
.deck-template-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.deck-template-head h3 { margin: 0; font-size: var(--text-md); }
.deck-template-desc { min-height: 40px; margin: 0; color: var(--muted); font-size: var(--text-xs); line-height: 1.6; }
.deck-template-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 11px; }
.deck-template-meta .tag { padding: 2px 7px; border-radius: var(--radius-pill); background: var(--bg); }
.deck-template-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding-top: var(--space-2); border-top: 1px solid var(--border-soft); }
.deck-template-actions .btn:first-child { margin-right: auto; }
.template-status { white-space: nowrap; }
.template-status.private { background: var(--bg); color: var(--muted); }
.template-status.pending { background: var(--warn-bg); color: #a16207; }
.template-status.approved { background: var(--success-bg); color: var(--success); }
.template-status.rejected { background: var(--danger-bg); color: var(--danger); }
.template-rejection { margin: 0; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--danger); background: var(--danger-bg); font-size: var(--text-xs); line-height: 1.5; }
.template-loading,.template-empty { grid-column: 1 / -1; padding: var(--space-8); border: 1px dashed var(--border); border-radius: var(--radius-md); color: var(--muted); text-align: center; }
.template-preview-panel { width: min(900px, 92vw); }
.template-preview-large { background: #111827; }
.template-preview-large img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
@media (max-width: 720px) { .template-hero,.template-guide { align-items: stretch; flex-direction: column; } }
