/* The PIANO GAMES group on the mini-games screen (js/piano-games.js, the rail
   and panes in js/theory/ui.js; the screen's own style is theory.css). */
.tdm-group { display: flex; flex-direction: column; gap: 3px; }
.tdm-pg-detail { margin: 10px 0 12px; font-family: "EB Garamond", Palatino, Georgia, serif;
  font-style: italic; font-size: 14px; color: #7a5b2e; }

/* the vignettes, in the paper's own ink like theory.css's: pure CSS loops,
   stopped by its prefers-reduced-motion rule */
.pgv-keys { left: 12%; right: 12%; bottom: 0; height: 30px; border-top: 1.5px solid #4d3a22;
  background: repeating-linear-gradient(90deg, rgba(243,230,200,.75) 0 calc(100%/14 - 1.5px), #4d3a22 calc(100%/14 - 1.5px) calc(100%/14)); }
/* Echo: four notes on the left of the bar line, then the same four answered */
.pgv-staff { left: 8%; right: 8%; top: 34px; height: 49px;
  background: repeating-linear-gradient(180deg, rgba(77,58,34,.45) 0 1px, transparent 1px 12px); }
.pge-bar { left: 50%; top: 34px; width: 1.5px; height: 49px; background: rgba(77,58,34,.6); }
.pge-n { width: 12px; height: 9px; border-radius: 50%; background: #4d3a22; transform: rotate(-18deg); opacity: 0;
  animation: pge-in 5s linear infinite; }
.pge-n::after { content: ""; position: absolute; right: 0; bottom: 4px; width: 1.5px; height: 25px; background: inherit; transform: rotate(18deg); transform-origin: bottom; }
.pge-n.q1 { left: 14%; top: 66px; } .pge-n.q2 { left: 23%; top: 54px; animation-delay: .4s; }
.pge-n.q3 { left: 32%; top: 60px; animation-delay: .8s; } .pge-n.q4 { left: 41%; top: 48px; animation-delay: 1.2s; }
.pge-n.a1, .pge-n.a2, .pge-n.a3, .pge-n.a4 { background: #6b2f1c; }
.pge-n.a1 { left: 56%; top: 66px; animation-delay: 2s; } .pge-n.a2 { left: 65%; top: 54px; animation-delay: 2.4s; }
.pge-n.a3 { left: 74%; top: 60px; animation-delay: 2.8s; } .pge-n.a4 { left: 83%; top: 48px; animation-delay: 3.2s; }
@keyframes pge-in { 0% { opacity: 0; } 4%, 34% { opacity: 1; } 40%, 100% { opacity: 0; } }
/* Encore: two chords fall onto the strike line over the keys */
.pgc-line { left: 12%; right: 12%; bottom: 36px; height: 2px; background: #6b2f1c; }
.pgc-g { top: -14px; width: 5%; height: 9px; border-radius: 4px; background: #4d3a22; animation: pgc-fall 3.2s linear infinite; }
.pgc-g.b2 { background: #6b2f1c; animation-delay: 1.6s; }
.pgc-g.k1 { left: 19.5%; } .pgc-g.k3 { left: 30.5%; } .pgc-g.k5 { left: 41.5%; }
.pgc-g.k2 { left: 52.5%; } .pgc-g.k4 { left: 63.5%; } .pgc-g.k6 { left: 74.5%; }
@keyframes pgc-fall { 0% { transform: translateY(0); opacity: 0; } 10%, 88% { opacity: .9; } 94% { transform: translateY(86px); opacity: .9; } 100% { transform: translateY(86px); opacity: 0; } }
/* Jam Night: the room shouts, one voice after another */
.pgj-b { top: 8px; padding: 2px 9px; border: 1.5px solid #4d3a22; border-radius: 12px; background: rgba(243,230,200,.75);
  font: 700 13px "EB Garamond", Georgia, serif; color: #6b2f1c; white-space: nowrap; opacity: 0; animation: pgj-say 6s ease-out infinite; }
.pgj-b.s1 { left: 10%; } .pgj-b.s2 { left: 34%; top: 16px; animation-delay: 2s; } .pgj-b.s3 { left: 56%; animation-delay: 4s; }
@keyframes pgj-say { 0% { opacity: 0; transform: translateY(8px); } 6%, 32% { opacity: 1; transform: none; } 40%, 100% { opacity: 0; } }
.pgj-h { bottom: 34px; width: 22px; height: 30px; border-radius: 11px 11px 3px 3px; background: rgba(77,58,34,.72); animation: pgj-bob 1.2s ease-in-out infinite; }
.pgj-h.h1 { left: 14%; } .pgj-h.h2 { left: 25%; animation-delay: .2s; } .pgj-h.h3 { left: 36%; animation-delay: .4s; }
.pgj-h.h4 { left: 47%; animation-delay: .1s; } .pgj-h.h5 { left: 58%; animation-delay: .5s; } .pgj-h.h6 { left: 69%; animation-delay: .3s; } .pgj-h.h7 { left: 80%; animation-delay: .6s; }
@keyframes pgj-bob { 0%, 100% { transform: none; } 50% { transform: translateY(-4px); } }
/* Scale Racer: the keys run up the scale and the car pulls ahead */
.pgr-road { left: 0; right: 0; top: 20px; height: 48px; background: rgba(77,58,34,.16); border-top: 1.5px solid #4d3a22; border-bottom: 1.5px solid #4d3a22; }
.pgr-dash { left: 0; right: -60px; top: 43px; height: 2px; background: repeating-linear-gradient(90deg, #4d3a22 0 22px, transparent 22px 44px); opacity: .6; animation: pgr-dash .8s linear infinite; }
@keyframes pgr-dash { to { transform: translateX(-44px); } }
.pgr-car { width: 38px; height: 12px; border-radius: 9px 11px 4px 4px; background: #4d3a22; }
.pgr-car::before, .pgr-car::after { content: ""; position: absolute; bottom: -4px; width: 8px; height: 8px; border-radius: 50%; background: #332414; }
.pgr-car::before { left: 5px; } .pgr-car::after { right: 5px; }
.pgr-car.c1 { top: 26px; left: 40%; opacity: .7; }
.pgr-car.c2 { top: 50px; left: 22%; background: #6b2f1c; animation: pgr-go 4s cubic-bezier(.3,0,.3,1) infinite alternate; }
@keyframes pgr-go { 0%, 12% { left: 22%; } 88%, 100% { left: 66%; } }
.pgr-k { bottom: 6px; width: 8px; height: 8px; border-radius: 50%; background: #6b2f1c; opacity: 0; animation: pgr-k 4s linear infinite; }
.pgr-k.n1 { left: 13.8%; } .pgr-k.n2 { left: 19.2%; animation-delay: .4s; } .pgr-k.n3 { left: 24.6%; animation-delay: .8s; } .pgr-k.n4 { left: 30%; animation-delay: 1.2s; }
.pgr-k.n5 { left: 35.5%; animation-delay: 1.6s; } .pgr-k.n6 { left: 40.9%; animation-delay: 2s; } .pgr-k.n7 { left: 46.3%; animation-delay: 2.4s; } .pgr-k.n8 { left: 51.7%; animation-delay: 2.8s; }
@keyframes pgr-k { 0% { opacity: 0; } 3%, 14% { opacity: 1; } 20%, 100% { opacity: 0; } }
/* Vienna After Dark: wizard casts a fireball across the street at a note-carrying foe */
.pgvd-wiz { left: 16%; bottom: 34px; width: 22px; height: 34px; border-radius: 10px 10px 3px 3px; background: #4d3a22; }
.pgvd-wiz::before { content: ""; position: absolute; left: 2px; top: -15px; border: 9px solid transparent; border-bottom: 16px solid #4d3a22; }
.pgvd-bolt { left: 28%; bottom: 52px; width: 12px; height: 12px; border-radius: 50%; background: #6b2f1c; animation: pgvd-fly 2.4s linear infinite; }
@keyframes pgvd-fly { 0% { transform: translateX(0) scale(.8); opacity: 0; } 10% { opacity: 1; } 78% { transform: translateX(135px) scale(1.1); opacity: 1; } 88%, 100% { transform: translateX(150px) scale(.2); opacity: 0; } }
.pgvd-foe { right: 18%; bottom: 34px; width: 26px; height: 28px; border-radius: 7px 7px 3px 3px; background: rgba(77,58,34,.75); animation: pgvd-step 2.4s ease-in-out infinite; }
@keyframes pgvd-step { 0%, 72%, 100% { transform: translateX(0); opacity: 1; } 82% { transform: translateX(6px); opacity: .4; } }
.pgvd-card { right: 14%; top: 10px; padding: 1px 10px; border: 1.5px solid #4d3a22; border-radius: 6px; background: rgba(243,230,200,.85);
  font: 700 18px/1.2 "EB Garamond", Georgia, serif; font-style: normal; color: #6b2f1c; }

/* a phone: theory.css hides the venue labels there, so this group keeps its
   own, in a frame that says where it ends */
@media (max-width: 760px) {
  .tdm-group { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px 6px 7px; margin-bottom: 4px;
    border: 1px solid rgba(201,171,114,.45); border-radius: 10px; }
  .tdm-group > .tdm-sep { display: block; grid-column: 1 / -1; margin: 4px 4px 1px; }
  /* arcade.css gives the library 200px of its own scroll; the frame would
     leave one row of the older games showing, so they get two and a bit */
  .tdm-rail { max-height: 244px; }
}
