.mg{--mg-blue:var(--silo-audio);--mg-yellow:var(--marigold);--mg-green:var(--go);--mg-red:var(--stop);--mg-purple:#5B2A86;--mg-orange:#B4500A}
.mg-sprite{position:absolute;width:0;height:0;overflow:hidden}
.mg-play>*+*,.mg-panel>*+*,.mg-after>*+*{margin-top:var(--s4)}
.mg-tabs span{min-width:11rem;min-height:var(--tap-large);align-items:center}
.mg-settings{display:grid;grid-template-columns:repeat(auto-fit,minmax(14rem,1fr));gap:var(--s3)}
.mg .mg-settings .choice{min-height:var(--tap)}
.mg-best{font-weight:700}
.mg-stat{flex-wrap:wrap;font-size:var(--text-h3);font-weight:700}
.mg-note{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--s3)}
.mg-cards{display:grid;grid-template-columns:repeat(var(--cols,4),minmax(0,1fr));gap:var(--s2);max-width:34rem}
.mg-card{width:100%;justify-self:stretch;position:relative;display:grid;place-items:center;aspect-ratio:4/5;min-width:0;min-height:var(--tap);padding:var(--s1) 0;border:var(--border) solid var(--ink);border-radius:var(--radius);background:var(--pine);color:var(--surface);font:800 var(--text-h2)/1 var(--font);cursor:pointer;touch-action:manipulation}
.mg-card>*{grid-area:1/1}
.mg-card>b{transition:opacity var(--fast) var(--ease)}
.mg-face{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--s1);width:100%;opacity:0;transition:opacity var(--fast) var(--ease)}
.mg-face svg{width:68%;height:auto;max-width:5rem;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.mg-face em{font:700 1.25rem/1.1 var(--font);font-style:normal}
.mg-card>.icon{position:absolute;top:2px;right:2px;width:1.25rem;height:1.25rem;stroke-width:3;opacity:0}
.mg-card.is-up,.mg-card.is-found{background:var(--surface);color:var(--ink);animation:mg-flip var(--base) var(--ease)}
.mg-card.is-up>b,.mg-card.is-found>b{opacity:0}
.mg-card.is-up .mg-face,.mg-card.is-found .mg-face{opacity:1}
.mg-card.is-found{background:var(--go-tint);border-color:var(--go);border-width:3px;color:var(--go);cursor:default}
.mg-card.is-found>.icon{opacity:1}
.mg-card[disabled]{cursor:default}
@keyframes mg-flip{from{transform:scaleX(.15)}}
.mg-pads{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--s2);max-width:26rem;padding:var(--s2);background:var(--ink);border-radius:var(--radius)}
.mg-pads.is-six{grid-template-columns:repeat(var(--cols,3),minmax(0,1fr));max-width:34rem}
.mg-pad{--c:var(--mg-blue);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--s2);aspect-ratio:1;min-width:0;min-height:var(--tap);padding:var(--s2);border:5px solid var(--ink);border-radius:var(--radius);background:var(--c);color:var(--surface);font:800 var(--text-h1)/1 var(--font);cursor:pointer;touch-action:manipulation}
.mg-pad svg{width:48%;height:auto;fill:currentColor}
.mg-pad--yellow{--c:var(--mg-yellow);color:var(--ink)}
.mg-pad--green{--c:var(--mg-green)}
.mg-pad--red{--c:var(--mg-red)}
.mg-pad--purple{--c:var(--mg-purple)}
.mg-pad--orange{--c:var(--mg-orange)}
.mg-pad.is-lit{background:color-mix(in srgb,var(--c) 35%,var(--surface));border-color:var(--surface);outline:3px solid var(--marigold);color:var(--ink)}
.mg-pad--yellow.is-lit{background:color-mix(in srgb,var(--c) 40%,var(--surface))}
.mg-pad[disabled]{cursor:default}
.mg-done h3,.mg-done h4{margin:0}
.mg-acts{display:flex;flex-wrap:wrap;gap:var(--s3)}
.mg.is-contrast .mg-card,.mg.is-contrast .mg-card.is-up,.mg.is-contrast .mg-card.is-found{background:var(--ink);color:var(--surface);border:3px solid var(--marigold)}
.mg.is-contrast .mg-card.is-found{border-style:double;border-width:6px}
.mg.is-contrast .mg-pad{background:var(--ink);color:var(--surface);outline:3px solid var(--marigold);outline-offset:-3px}
.mg.is-contrast .mg-pad.is-lit{background:var(--marigold);color:var(--ink);border-color:var(--surface);outline-color:var(--surface)}
.mg .mg-pad:focus-visible{outline:4px solid var(--surface);outline-offset:-6px}
.mg-after{border-top:var(--border) solid var(--ink);padding-top:var(--s4)}
.mg-clear{min-height:var(--tap);padding:0;border:0;background:none;color:var(--pine);font:700 var(--text-body)/1.2 var(--font);text-decoration:underline;text-underline-offset:.18em;cursor:pointer}
.mg-last h3,.mg-last h4{font-size:var(--text-h3);margin:0}
.mg .mg-last ul{list-style:none;padding:0;margin-top:var(--s3);border-top:var(--hair) solid var(--line)}
.mg .mg-last li{margin:0;padding:var(--s2) 0;border-bottom:var(--hair) solid var(--line);font-variant-numeric:tabular-nums}
.mg-log{display:grid;gap:var(--s3);justify-items:start}
.no-js .mg-settings,.no-js .mg-tabs,.no-js .mg-after>.mg-clear,.no-js .mg-acts,.no-js .mg-log{display:none}
@media (max-width:600px){
  .mg-tabs,.mg-levels,.mg-tabs label,.mg-levels label{width:100%}
  .mg-tabs span,.mg-levels span{width:100%;align-items:center}
  .mg-cards,.mg-pads{margin-inline:calc(-1 * var(--s4));max-width:none}
  .mg-pads.is-six{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mg-acts .btn,.mg-log .btn,.mg-log .choice{width:100%}
}
@media (prefers-reduced-motion: reduce){
  .mg-card,.mg-card.is-up,.mg-card.is-found{animation:none}
  .mg-card>b,.mg .mg-face{transition:opacity 120ms linear!important}
}
@page mgland{size:letter landscape;margin:12mm}
@media print{
  .mg.is-printing>.tool-head,.mg.is-printing .tool-body>:not(.mg-print){display:none!important}
  .mg-print{page:mgland}
  .mg-print .print-title{margin:0}
  .mg-nameline{margin-top:2mm;white-space:pre-wrap}
  .mg-print .sheet{margin-top:2mm}
  .mg-print .sheet th,.mg-print .sheet td{height:8mm;padding:.5mm 2mm;vertical-align:middle}
  .mg-print th:nth-child(1),.mg-print th:nth-child(2){width:9%}
  .mg-print tbody th{width:auto}
  .mg-print th:nth-child(7){width:24%}
  .mg-digits span{display:inline-block;width:7mm;text-align:center}
  .mg-box{margin-top:3mm;border:1pt solid #000;padding:2mm 3mm}
  .mg-pfoot{margin-top:2mm;font-size:9pt}
}
