/* Store templates (/templates/), 2026-11-07. Loaded after rk.css on template pages only. */

/* ── Template page ── */
.tp-hero .art-head { max-width: 780px; margin: 0 auto; }
.tp-head { display: flex; align-items: center; gap: 16px; }
.tp-head h1 { margin: 10px 0 0; }
.tp-ic { flex: 0 0 56px; height: 56px; border-radius: 16px; background: var(--ink); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.tp-ic svg { width: 28px; height: 28px; }
.tp-lead { max-width: 700px; margin-top: 14px; }
.tp-facts { display: grid; grid-template-columns: 1.2fr 1.2fr .8fr; gap: 10px; margin-top: 22px; }
.tp-facts > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; min-width: 0; }
.tp-facts span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tp-facts b { display: block; font-size: 14px; color: var(--ink); margin-top: 3px; line-height: 1.35; }
.tp-facts > div:nth-child(2) { background: #fffbeb; border-color: #fde68a; }
.tp-facts > div:nth-child(2) span { color: #92400e; }

.tp-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 18px 0 6px; }
.tp-hint { color: var(--muted); font-weight: 500; }
.tp .tmpl-txt { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.tk { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; line-height: 1; padding: 4px 8px; border-radius: 999px; background: var(--bg-soft-2); color: var(--muted); border: 1px solid var(--line-2); white-space: nowrap; }
.tk svg { width: 12px; height: 12px; }
.tk-photo { background: #eef2ff; color: #4338ca; border-color: #e0e7ff; }
.tk-reading { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.tk-count { background: #f0fdf4; color: #166534; border-color: #dcfce7; }
.tk-signature, .tk-rating { background: #faf5ff; color: #6b21a8; border-color: #f3e8ff; }
.tp-legend { font-size: 14px; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 16px; margin: 6px 0 0; }
.tp-legend b { color: var(--ink); }

.tp-why, .tp-how { margin-top: 40px; }
.tp-why h2, .tp-how h2 { font-size: 24px; }
.tp-why p { font-size: 16.5px; line-height: 1.65; color: var(--ink-2); max-width: 720px; }
.tp-how ol { list-style: none; counter-reset: s; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tp-how li { counter-increment: s; position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 16px 54px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.tp-how li::before { content: counter(s); position: absolute; left: 16px; top: 15px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.tp-how li b { color: var(--ink); }

/* ── Index ── */
.tx-jump { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tx-jump a { font-size: 14px; font-weight: 600; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 15px; }
.tx-jump a:hover { border-color: var(--accent); color: var(--ink); }
.tx-group { align-items: flex-end; scroll-margin-top: 90px; }
.tx-group p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.tx-card { display: flex; flex-direction: column; }
.tx-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--ink); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.tx-ic svg { width: 22px; height: 22px; }
.tx-card p { flex: 1; }
.tx-stat { display: block; font-size: 12.5px; font-weight: 700; color: #92400e; margin: 4px 0 10px; }
.tx-how { margin-top: 56px; }
.tx-how h2 { text-align: center; }
.tx-how-g { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.tx-how-g > div { background: var(--bg-soft); border: 1px solid var(--line-2); border-radius: 14px; padding: 16px; }
.tx-how-g b { color: var(--ink); font-size: 15px; }
.tx-how-g p { margin: 6px 0 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

@media (max-width: 860px) {
  .tp-facts { grid-template-columns: 1fr; }
  .tp-how ol { grid-template-columns: 1fr; }
  .tx-how-g { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .tp-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .tp-head h1 { margin-top: 8px; }
  .tp-ic { flex-basis: 44px; height: 44px; border-radius: 12px; }
  .tp-ic svg { width: 22px; height: 22px; }
  .tx-how-g { grid-template-columns: 1fr; }
  .tx-group { flex-direction: column; align-items: flex-start; gap: 6px; }
}
@media print {
  .tp-facts, .tp-why, .tp-how, .tp-legend, .tmpl-cta, .post-related, .post-faq, .tp-meta .tp-hint { display: none !important; }
  .tk { border: 0; background: none; padding: 0; }
}
