/* Templates page (/templates/): one screen, no footer. The drum and floor are a WebGL canvas
   behind our nav and a bottom bar (number and name, our buttons, music). Behaviour: templates2.js. */
html:has(.t2p), body.t2p { height: 100%; overflow: hidden; overscroll-behavior: none; }
.t2p .page { height: 100vh; height: 100svh; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.t2p .hdr { position: relative; z-index: 3; }
.t2-gl { position: fixed; inset: 0; z-index: 0; display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; }
.t2-gl.drag { cursor: grabbing; }

.t2-bar { position: fixed; z-index: 3; left: 0; right: 0; bottom: 28px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; max-width: 1240px; margin: 0 auto; padding: 0 32px; pointer-events: none; }
.t2-bar > * { pointer-events: auto; }
.t2-info { display: flex; align-items: baseline; gap: 12px; margin: 0; min-width: 0; }
.t2-no { font-family: var(--dm); font-size: 12px; letter-spacing: 0.4px; color: var(--dim); font-variant-numeric: tabular-nums; }
.t2-name { font-family: var(--body); font-size: 15px; line-height: 20px; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t2-music { justify-self: end; gap: 8px; }
.t2-eq { display: inline-flex; align-items: flex-end; gap: 2px; width: 14px; height: 12px; }
.t2-eq i { flex: 1; height: 3px; border-radius: 1px; background: currentColor; transition: height 0.3s; }
.t2-music.playing .t2-eq i { animation: t2-eq 1.1s ease-in-out infinite; }
.t2-music.playing .t2-eq i:nth-child(2) { animation-delay: -0.35s; }
.t2-music.playing .t2-eq i:nth-child(3) { animation-delay: -0.7s; }
.t2-music.playing .t2-eq i:nth-child(4) { animation-delay: -0.15s; }
.t2-music.off { color: var(--dim); }
@keyframes t2-eq { 0%, 100% { height: 3px; } 50% { height: 12px; } }

.t2-hint { position: fixed; z-index: 3; left: 50%; bottom: 36px; margin: 0; transform: translateX(-50%); font-family: var(--dm); font-size: 11px; letter-spacing: 0.4px; text-transform: uppercase; color: var(--dim); pointer-events: none; transition: opacity 0.6s; }
.t2-hint.gone { opacity: 0; }

/* without WebGL: a plain row of cards */
.t2-nogl .t2-gl { display: none; }
.t2-row { position: fixed; left: 0; right: 0; top: 50%; transform: translateY(-50%); display: flex; gap: 16px; overflow-x: auto; padding: 0 32px; scroll-snap-type: x mandatory; }
.t2-card { position: relative; flex: none; width: min(70vw, 560px); aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; scroll-snap-align: center; color: #fff; text-decoration: none; }
.t2-card img { width: 100%; height: 100%; object-fit: cover; }
.t2-card span { position: absolute; left: 20px; bottom: 16px; font-size: 22px; }

@media (max-width: 759px) {
  .t2-bar { bottom: 18px; gap: 14px; padding: 0 16px; }
  .t2-hint { bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) { .t2-music.playing .t2-eq i { animation: none; height: 8px; } }
