/* Scoped player styles: the approved game scenery and layout are untouched. */
.kata-player {
  width: min(660px, 100%);
  margin: 0 auto;
  color: var(--cream, #fff3d8);
  font-family: var(--display, monospace);
  text-align: center;
}
.kata-player__title {
  margin: 0 0 10px;
  color: var(--gold, #f2c56a);
  font: 400 clamp(1.5rem, 5vw, 2rem)/1 var(--display, monospace);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.kata-player__stage {
  position: relative;
  width: min(100%, 360px);
  height: min(52svh, 480px);
  min-height: 170px;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  border: 3px solid #071c31;
  outline: 2px solid #e8b45b;
  background: #080a0c;
  box-shadow: 5px 5px 0 rgba(3,25,46,.7);
}
.kata-player__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
  opacity: 1;
}
.kata-player__image--enter { animation: kata-photo-dissolve 90ms linear both; }
@keyframes kata-photo-dissolve { from { opacity: 0; } to { opacity: 1; } }
.kata-player__loading {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  margin: 0;
  padding: 10px;
  transform: translateY(-50%);
  color: #fff3d8;
  font: 1.25rem/1.2 var(--display, monospace);
}
.kata-player__rhythm {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 40px;
  margin: 10px 0 8px;
}
.kata-player__rhythm-label { color: #f3cf81; font: .5rem/1.2 var(--pixel, monospace); }
.kata-player__beat {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid #e8b45b;
  color: #fff3d8;
  background: #063e53;
  font: 1.4rem/1 var(--display, monospace);
}
.kata-player__beat.is-active { color: #062b4b; background: #f2c56a; box-shadow: 2px 2px 0 #03192e; }
.kata-player__controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kata-player .kata-player__control {
  min-width: 0;
  min-height: 42px;
  width: 100%;
  margin: 0;
  padding: 10px 6px;
  border: 2px solid #fff3d8;
  color: #062b4b;
  background: #f2c56a;
  box-shadow: inset -3px -3px 0 #c68a3e, 3px 3px 0 #062b4b;
  font: .53rem/1.35 var(--pixel, monospace);
  letter-spacing: 0;
  cursor: pointer;
}
.kata-player .kata-player__control:hover:not(:disabled) { background: #fff3d8; }
.kata-player .kata-player__control:active:not(:disabled) { transform: translate(1px, 1px); }
.kata-player .kata-player__control:disabled { opacity: .52; cursor: default; }
.kata-player__lower { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 13px; }
.kata-player__pace { display: flex; align-items: center; gap: 8px; color: #f3cf81; font: .47rem/1.3 var(--pixel, monospace); }
.kata-player__speed {
  min-height: 36px;
  max-width: 140px;
  padding: 6px 24px 6px 8px;
  border: 2px solid #e8b45b;
  border-radius: 0;
  color: #fff3d8;
  background: #063e53;
  font: 1.2rem/1 var(--display, monospace);
}
.kata-player .kata-player__frame { margin: 0; color: #fff3d8; font: 1.25rem/1 var(--display, monospace); white-space: nowrap; }
.kata-player .kata-player__status { min-height: 1.2em; margin: 8px 0 0; color: #ffe1b2; font: 1rem/1.1 var(--display, monospace); }
.kata-player .kata-player__back { display: block; width: min(320px,100%); margin: 14px auto 0; background: #d95e43; color: #fff3d8; box-shadow: inset -3px -3px 0 #97372c, 3px 3px 0 #062b4b; }
.kata-player--compact { margin-top: 16px; }
.kata-player--compact .kata-player__title { font-size: 1.3rem; margin-bottom: 8px; }
.kata-player--compact .kata-player__stage { width: min(100%,190px); height: min(26svh,240px); min-height: 135px; }
.kata-player--compact .kata-player__rhythm { margin: 8px 0 6px; min-height: 30px; gap: 8px; }
.kata-player--compact .kata-player__beat { width: 24px; height: 24px; font-size: 1.1rem; }
.kata-player--compact .kata-player__control { min-height: 36px; font-size: .48rem; padding: 8px 4px; }
.kata-player--compact .kata-player__lower { margin-top: 9px; }
.kata-player--compact .kata-player__speed { min-height: 31px; font-size: 1rem; }
.kata-player--compact .kata-player__status { font-size: .9rem; }
.kata-player--reduced .kata-player__image--enter { animation: none; }
@media (max-width: 420px) {
  .kata-player__stage { height: min(49svh,420px); }
  .kata-player__controls { gap: 6px; }
  .kata-player .kata-player__control { font-size: .47rem; }
  .kata-player__pace { font-size: .4rem; }
  .kata-player--compact .kata-player__stage { height: min(23svh,210px); }
  .kata-player--compact .kata-player__control { font-size: .46rem; }
}
@media (prefers-reduced-motion: reduce) {
  .kata-player__image--enter { animation: none; }
}
