:root {
  --player-ink: #172033;
  --player-muted: #687487;
  --player-line: #d8e0e9;
  --player-panel: #ffffff;
  --player-green: #087f6f;
  --player-green-hover: #076b5f;
  --player-stage: #101820;
}

[hidden] {
  display: none !important;
}

button,
select,
input {
  font: inherit;
}

button {
  letter-spacing: 0;
}

.player-page {
  width: min(1280px, 100%);
  min-height: calc(100vh - 157px);
  margin: 0 auto;
  padding: 28px 24px 40px;
}

.player-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.player-intro > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.player-intro h1 {
  overflow: hidden;
  margin: 0;
  color: var(--player-ink);
  font-size: 26px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-mark {
  flex: 0 0 auto;
  margin: 0;
  padding: 5px 8px;
  border: 1px solid #b8d9d3;
  border-radius: 6px;
  color: var(--player-green);
  background: #edf8f6;
  font-size: 11px;
  font-weight: 800;
}

.load-view {
  display: grid;
  min-height: min(580px, calc(100vh - 245px));
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 42px 24px;
  border: 1px dashed #aebac8;
  border-radius: 8px;
  background: var(--player-panel);
  box-shadow: 0 16px 42px rgba(23, 32, 51, 0.06);
  text-align: center;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.load-view.is-dragging {
  border-color: var(--player-green);
  background: #effaf8;
}

.file-symbol {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 4px;
  place-items: center;
  border: 1px solid #c8d4df;
  border-radius: 8px;
  color: var(--player-green);
  background: #f6f9fb;
}

.file-symbol svg {
  width: 28px;
  height: 28px;
}

.load-view h2 {
  margin: 0;
  font-size: 20px;
}

.load-view p {
  margin: 0 0 10px;
  color: var(--player-muted);
  font-size: 14px;
}

.choose-command,
.quiet-command,
.icon-command {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
}

.choose-command {
  min-width: 132px;
  padding: 0 17px;
  color: #ffffff;
  background: var(--player-green);
  font-weight: 750;
}

.choose-command:hover,
.primary-command:hover {
  background: var(--player-green-hover);
}

.quiet-command {
  flex: 0 0 auto;
  padding: 0 13px;
  border-color: var(--player-line);
  color: #314056;
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.quiet-command:hover,
.icon-command:hover {
  background: #eef2f5;
}

.choose-command svg,
.quiet-command svg,
.icon-command svg,
.file-symbol svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.choose-command svg,
.quiet-command svg {
  width: 18px;
  height: 18px;
}

.privacy-note {
  margin-top: 7px;
  color: #798698;
  font-size: 12px;
}

.player-view {
  display: grid;
  gap: 12px;
}

.stage-shell {
  position: relative;
  display: grid;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  place-items: center;
  border: 1px solid #293541;
  border-radius: 8px;
  background: var(--player-stage);
  box-shadow: 0 18px 44px rgba(23, 32, 51, 0.16);
}

.stage-shell canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.stage-shell:fullscreen {
  max-height: none;
  border: 0;
  border-radius: 0;
  background: #090f15;
}

.render-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #d9e2eb;
  background: rgba(16, 24, 32, 0.82);
  font-size: 13px;
  font-weight: 650;
}

.controls {
  display: grid;
  grid-template-columns: 42px 42px 54px minmax(120px, 1fr) 54px 66px 42px;
  min-width: 0;
  padding: 10px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--player-line);
  border-radius: 8px;
  background: var(--player-panel);
}

.icon-command {
  width: 42px;
  min-height: 42px;
  padding: 0;
  border-color: transparent;
  color: #354358;
  background: transparent;
}

.icon-command svg {
  width: 19px;
  height: 19px;
}

.primary-command {
  color: #ffffff;
  background: var(--player-green);
}

.pause-icon {
  display: none;
}

.is-playing .play-icon {
  display: none;
}

.is-playing .pause-icon {
  display: block;
}

.time-output {
  color: #536074;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.scrubber {
  width: 100%;
  min-width: 0;
  accent-color: var(--player-green);
}

.speed-select {
  width: 66px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--player-line);
  border-radius: 6px;
  color: #354358;
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.recording-info {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(3, auto);
  margin: 0;
  padding: 12px 14px;
  align-items: center;
  gap: 24px;
  border-top: 1px solid var(--player-line);
}

.recording-info div {
  min-width: 0;
}

.recording-info dt {
  margin-bottom: 3px;
  color: #8590a0;
  font-size: 10px;
  font-weight: 750;
}

.recording-info dd {
  overflow: hidden;
  margin: 0;
  color: #344155;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-toast {
  position: fixed;
  z-index: 30;
  right: 20px;
  bottom: 20px;
  max-width: min(400px, calc(100vw - 40px));
  padding: 11px 14px;
  border: 1px solid #edaaa5;
  border-radius: 7px;
  color: #9b302b;
  background: #fff3f2;
  box-shadow: 0 14px 34px rgba(23, 32, 51, 0.16);
  font-size: 13px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.player-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .player-page {
    padding: 20px 14px 32px;
  }

  .player-intro h1 {
    font-size: 21px;
  }

  .controls {
    grid-template-columns: 42px 42px 1fr 54px;
  }

  .controls .time-output:first-of-type,
  .speed-select {
    display: none;
  }

  .scrubber {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .recording-info {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 18px;
  }

  .recording-info div:nth-child(3) {
    display: none;
  }
}

@media (max-width: 460px) {
  .player-intro {
    align-items: flex-start;
  }

  .player-intro > div {
    display: grid;
    gap: 7px;
  }

  .quiet-command {
    width: 40px;
    padding: 0;
    font-size: 0;
  }

  .load-view {
    min-height: calc(100vh - 244px);
  }
}
