/* Kopnota marketing site · templates gallery and text settings */
/* ---------- Templates ---------- */
.tpl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tpl-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(12px, 2vw, 22px); perspective: 1200px; }
.tpl { margin: 0; display: grid; gap: 10px; transition: opacity .4s, transform .5s cubic-bezier(.2, .8, .2, 1); }
.tpl img { width: 100%; height: auto; border-radius: 6px; background: #fff; box-shadow: var(--shadow); transition: transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s; transform-origin: 50% 100%; }
.tpl:hover img { transform: translateY(-8px) rotateX(6deg) scale(1.03); box-shadow: var(--shadow-lg); }
.tpl figcaption { font-size: .8rem; font-weight: 600; color: var(--muted); text-align: center; }
.tpl.hide { display: none; }
.tpl.pop { animation: tpl-pop .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d, 0s); }
@keyframes tpl-pop { from { opacity: 0; transform: translateY(18px) scale(.94); } }
.tpl-grid.few { grid-template-columns: repeat(3, minmax(0, 220px)); justify-content: center; }
.tpl-note { margin-top: 22px; text-align: center; color: var(--muted); font-size: var(--step--1); }
.type-row { margin-top: clamp(56px, 8vw, 96px); }
.type-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin-bottom: 16px; }
.type-size { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.type-size output { min-width: 5.5em; color: var(--muted); font-weight: 500; }
.type-paper { --tf: var(--font-body); width: min(100%, 420px); margin: 0 auto; background: #fff; color: #10173A; border-radius: 12px; box-shadow: var(--shadow-lg); padding: 26px; display: grid; gap: 14px; font-family: var(--tf); font-size: calc(13px * var(--ts)); transition: font-size .3s; }
.type-paper[data-font="serif"] { --tf: Georgia, "Times New Roman", serif; }
.type-paper[data-font="rounded"] { --tf: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", var(--font-body); }
.type-paper[data-font="mono"] { --tf: var(--font-mono); }
.tp-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid #2F55E4; }
.tp-logo { flex: none; width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #2F55E4, #2DD497); }
.tp-title { flex: 1; font-size: 1.9em; font-weight: 800; letter-spacing: .06em; color: #1C2C8C; transition: text-align .3s; }
.type-paper[data-pos="left"] .tp-title { text-align: left; } .type-paper[data-pos="center"] .tp-title { text-align: center; } .type-paper[data-pos="right"] .tp-title { text-align: right; }
.tp-rows p, .tp-total { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid #EEF0F8; }
.tp-rows b, .tp-total b { font-variant-numeric: tabular-nums; }
.tp-total { border-bottom: 0; border-top: 2px solid #1C2C8C; font-size: 1.15em; font-weight: 800; }
.tp-total b { color: #1C2C8C; }
.tp-notes { color: #5B6385; font-size: .9em; }
.type-size { white-space: nowrap; }
@media (max-width: 1080px) { .tpl-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .tpl-grid, .tpl-grid.few { grid-template-columns: repeat(2, 1fr); } }
/* Click to select, double-click to preview (as in the app) */
.tpl { cursor: pointer; border-radius: 8px; outline: none; }
.tpl img { outline: 3px solid transparent; outline-offset: 3px; transition: transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s, outline-color .2s; }
.tpl[aria-pressed="true"] img { outline-color: var(--blue); }
.tpl[aria-pressed="true"] figcaption { color: var(--blue); font-weight: 800; }
.tpl:focus-visible img { outline-color: var(--blue-soft); }
.tpl-try { display: flex; width: fit-content; margin: 22px auto 0; }
.tpl-dialog { width: min(92vw, 640px); max-height: 92vh; padding: 0; border: 0; border-radius: 22px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); overflow: auto; }
.tpl-dialog::backdrop { background: rgba(6, 11, 51, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tpl-dialog[open] { animation: tpl-open .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes tpl-open { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.tpl-dialog header { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.tpl-dialog header div { display: flex; gap: 8px; }
.tpl-dialog img { display: block; width: calc(100% - 48px); height: auto; margin: 24px; border-radius: 6px; background: #fff; box-shadow: var(--shadow-lg); }
@media (prefers-reduced-motion: reduce) { .tpl-dialog[open] { animation: none; } }
