/* Piano icon (Material "piano" glyph at icon scale): light tile, dark frame, 3 white + 2 black keys.
   Shared by the Enter gate and the admin Entry tab. Keys are built by /assets/piano-engine.js. */

/* sizes are relative to the tile itself (inset/absolute), so the icon scales cleanly at any size */
.gate-piano {
  position: relative; background: #e8e8e8; border-radius: 22%;
  box-shadow: 0 0 0 1px #8a8a8a, 0 0 60px rgba(255, 255, 255, .12);
  transition: box-shadow .25s ease;
}
.gate-frame { position: absolute; inset: 7%; padding: 6.9%; background: #1f1f1f; border-radius: 17%; }
.gate-keys { position: relative; width: 100%; height: 100%; display: flex; gap: 4%; border-radius: 6% 6% 9% 9%; overflow: hidden; }
.gate-piano.glow { box-shadow: 0 0 0 1px #9fd0f5, 0 0 70px rgba(150, 205, 255, .42); }

.gate-key {
  display: flex; align-items: flex-end; justify-content: center; padding: 0; cursor: pointer;
  transition: background .1s, transform .08s; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.gate-key.white { flex: 1; padding-bottom: 12%; background: #e8e8e8; }
.gate-key.black {
  position: absolute; top: 0; width: 18%; height: 58%; z-index: 2; padding-bottom: 9%;
  background: #1f1f1f; border-radius: 0 0 14% 14% / 0 0 8% 8%;
  box-shadow: 0 0 0 3px #1f1f1f;   /* keeps a clean gap to the white keys, like the icon */
}
.gate-piano[data-input] .gate-key.white:not(.lit):not(.held):hover { background: #f6f6f6; }
.gate-piano[data-input] .gate-key.black:not(.lit):not(.held):hover { background: #2c2c2c; }
/* the whole key lights up — played back or pressed */
.gate-key { transition: background .28s ease, box-shadow .28s ease, transform .08s; }
.gate-key.lit, .gate-key.held { transition-duration: .05s; }
.gate-key.white.lit, .gate-key.white.held {
  background: linear-gradient(180deg, #9fd2ff, #4f9fef);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, .55);
}
.gate-key.black.lit, .gate-key.black.held {
  background: linear-gradient(180deg, #7cc0ff, #2f7fd6);
  box-shadow: 0 0 0 3px #1f1f1f, inset 0 0 12px rgba(255, 255, 255, .45);
}
.gate-key.held { transform: translateY(1px); }
.gate-key:focus-visible { outline: 3px solid #4f8fc4; outline-offset: -6px; }

