/* 디자인 비교 화면(/templates.html). 관리 화면과 같은 기본 색을 쓰고, 미리보기 안내 막대는 눈에 띄게 둡니다. */
body.tpl-page { font-size: 15px; line-height: 1.7; }

.tpl-banner { padding: 14px max(16px, env(safe-area-inset-left)); background: #1f1f1d; color: #ffffff; }
.tpl-banner p { max-width: 1120px; margin: 0 auto; font-size: 13px; line-height: 1.6; color: #e6e6e3; }
.tpl-banner .tpl-banner-title { margin-bottom: 4px; color: #ffffff; font-size: 16px; font-weight: 500; }

.tpl-main { max-width: 1152px; margin: 0 auto; padding: 22px 16px 48px; }
.tpl-head h1 { font-size: 24px; line-height: 1.35; }
.tpl-lead { margin-top: 6px; color: var(--ink-2); font-size: 14px; }
.tpl-pub { margin-top: 8px; color: var(--ok); font-size: 14px; font-weight: 500; }

.tpl-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; margin: 20px 0 0; padding: 0; border: 0; }
@media (min-width: 760px) { .tpl-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .tpl-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.tpl-card { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 8px 8px 10px; border: 1px solid var(--rule); background: var(--white); cursor: pointer; }
.tpl-card:hover { border-color: var(--rule-strong); }
.tpl-card.is-selected { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.tpl-thumb { position: relative; aspect-ratio: 390 / 700; overflow: hidden; background: var(--mat); }
.tpl-thumb iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; pointer-events: none; }
.tpl-choice { display: flex; align-items: center; gap: 8px; min-height: var(--touch); font-weight: 500; cursor: pointer; }
.tpl-choice input { flex-shrink: 0; width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.tpl-choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.tpl-card-sum { color: var(--ink-3); font-size: 13px; line-height: 1.5; }
.tpl-card-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; margin-top: 4px; font-size: 13px; }
.tpl-card-meta a { display: inline-flex; align-items: center; min-height: var(--touch); color: var(--ink-2); }
.badge { padding: 0 6px; border: 1px solid; font-size: 12px; line-height: 20px; }
.badge-pub { border-color: #a9bcae; background: var(--ok-tint); color: var(--ok); }

.tpl-stage { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--rule); }
.tpl-stage-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 14px; }
.tpl-stage-head h2 { font-size: 20px; line-height: 1.4; }
.tpl-sum { color: var(--ink-3); font-size: 14px; }
.tpl-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.seg { display: inline-flex; }
.seg button { min-height: var(--touch); padding: 6px 16px; border: 1px solid var(--rule-strong); background: transparent; color: var(--ink); font-size: 14px; }
.seg button + button { border-left: 0; }
.seg button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--wall); }
.tpl-frame { position: relative; overflow: hidden; margin: 0 auto; border: 1px solid var(--rule-strong); background: #ffffff; }
.tpl-frame[data-device="mobile"] { max-width: 392px; }
.tpl-frame iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; }
.tpl-note { margin-top: 10px; color: var(--ink-3); font-size: 13px; text-align: center; }
.tpl-framed { margin-top: 20px; }
