/* Print templates page: the Magic Mirror viewer (see /assets/js/template-mirror.js) */
.tpl-mirror .grid-sec { display: none; }
.tpl-stage-mirror { margin-bottom: var(--gap-section); display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); grid-template-areas: "m i" "s s"; gap: 32px 48px; align-items: center; max-width: 1200px; margin-inline: auto; padding-inline: var(--margin); }
.mirror-wrap { grid-area: m; position: relative; display: flex; justify-content: center; }
.mirror { width: min(100%, calc((100vh - 280px) * .62), 520px); min-width: 300px; aspect-ratio: 62 / 100; padding: clamp(14px, 2.2vw, 24px); border-radius: 4px;
  background: linear-gradient(135deg, #2b2019, #a3815a 18%, #4a372a 38%, #c9a678 58%, #5a4330 78%, #2b2019);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 0 1px #20160f, inset 0 0 0 2px rgba(255, 220, 170, .25), inset 0 0 0 7px rgba(0, 0, 0, .35), inset 0 0 0 9px rgba(255, 220, 170, .2); }
.mirror-glass { position: relative; height: 100%; overflow: hidden; background: radial-gradient(ellipse 80% 60% at 50% 40%, #241a2b, #07050a 75%); box-shadow: inset 0 0 40px rgba(0, 0, 0, .9), inset 0 0 0 3px #120c0a; }
.mirror-screen { position: absolute; inset: 0 0 14%; display: grid; place-items: center; }
.mirror-screen img { grid-area: 1 / 1; max-width: 76%; max-height: 82%; width: auto; height: auto; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 0 50px rgba(136, 76, 158, .35); }
.mirror-screen img.is-land { max-width: 90%; }
.mirror-screen .in-r { animation: m-in-r .45s var(--ease); }
.mirror-screen .in-l { animation: m-in-l .45s var(--ease); }
.mirror-screen .out-l { animation: m-out-l .45s var(--ease) forwards; }
.mirror-screen .out-r { animation: m-out-r .45s var(--ease) forwards; }
@keyframes m-in-r { from { opacity: 0; transform: translateX(18%) scale(.96); } }
@keyframes m-in-l { from { opacity: 0; transform: translateX(-18%) scale(.96); } }
@keyframes m-out-l { to { opacity: 0; transform: translateX(-18%) scale(.96); } }
@keyframes m-out-r { to { opacity: 0; transform: translateX(18%) scale(.96); } }
.mirror-sheen { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(118deg, transparent 22%, rgba(255, 255, 255, .07) 32%, transparent 40%, transparent 62%, rgba(255, 255, 255, .04) 68%, transparent 74%); }
.mirror-touch { position: absolute; left: 0; right: 0; bottom: 4%; margin: 0; text-align: center; font: 600 clamp(12px, 1.4vw, 16px) var(--body); letter-spacing: .14em; text-transform: uppercase; color: #e7b8f2; text-shadow: 0 0 8px #b04fd0, 0 0 22px #884c9e; animation: m-glow 2.4s ease-in-out infinite; }
@keyframes m-glow { 50% { opacity: .55; } }
.mirror-prev, .mirror-next { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--accent); background: rgba(14, 11, 17, .85); color: var(--accent); font-size: 30px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding-bottom: 4px; transition: background-color .2s, color .2s; }
.mirror-prev:hover, .mirror-next:hover { background: var(--accent); color: var(--accent-ink); }
.mirror-prev { left: 0; }
.mirror-next { right: 0; }
.mirror-info { grid-area: i; }
.mirror-count { color: var(--accent); font: 700 12px var(--body); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px; }
.mirror-name { font-size: var(--t-head); margin-bottom: 10px; }
.mirror-meta { color: var(--muted); margin-bottom: 24px; }
.mirror-toggle { display: inline-flex; border: 1.5px solid #4a3d55; margin-bottom: 24px; }
.mirror-toggle button { font: 600 14px var(--body); color: var(--ink); background: none; border: 0; padding: 10px 18px; min-height: 44px; cursor: pointer; }
.mirror-toggle button[aria-pressed="true"] { background: var(--purple); }
.mirror-note { color: var(--muted); font-size: var(--t-small); }
.mirror-strip { grid-area: s; position: relative; list-style: none; margin: 0; padding: 6px 2px 14px; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #4a3d55 transparent; }
.mirror-strip li { flex: none; scroll-snap-align: center; }
.mirror-strip button { display: block; padding: 0; border: 0; background: none; cursor: pointer; opacity: .55; transition: opacity .2s; outline-offset: 2px; }
.mirror-strip button:hover, .mirror-strip button[aria-current="true"] { opacity: 1; }
.mirror-strip button[aria-current="true"] { outline: 2px solid var(--accent); }
.mirror-strip img { height: 84px; width: auto; aspect-ratio: 2 / 3; object-fit: cover; }
.mirror-strip img.is-land { aspect-ratio: 3 / 2; }
@media (max-width: 860px) {
  .tpl-stage-mirror { grid-template-columns: 1fr; grid-template-areas: "m" "i" "s"; gap: 20px; text-align: center; }
  .mirror { width: min(64vw, 340px, calc((100vh - 330px) * .62)); min-width: 220px; }
  .mirror-prev, .mirror-next { width: 44px; height: 44px; font-size: 26px; }
  .mirror-prev { left: 0; }
  .mirror-next { right: 0; }
  .mirror-count { margin-bottom: 4px; }
  .mirror-note { display: none; }
  .mirror-name { font-size: 30px; margin-bottom: 4px; }
  .mirror-meta { margin-bottom: 16px; }
  .mirror-toggle { margin-bottom: 12px; }
  .mirror-strip img { height: 64px; }
}

@media (prefers-reduced-motion: reduce) { .mirror-touch { animation: none; } .mirror-screen img { animation: none !important; } }
