html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ffd23f;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.card {
  position: relative;
}

.thumbWrap {
  position: relative;
  width: 190px;
  aspect-ratio: 16/9;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.playBtn {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity 220ms ease-out;
}

.playIcon {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 2px 4px rgba(23, 20, 26, 0.4));
}
.playIcon polygon {
  fill: #fff7e6;
}

.badgeLite {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.66);
  color: #fff7e6;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  font-weight: 600;
  font-size: 9px;
  line-height: 1.3;
  transition: opacity 220ms ease-out;
}

.cardTitleLite {
  position: absolute;
  inset: auto 0 0 0;
  padding: 8px 12px;
  background: rgba(23, 20, 26, 0.66);
  color: #fff7e6;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  font-weight: 600;
  font-size: 11px;
  line-height: 1.3;
  transition: opacity 220ms ease-out;
}

.frameTop {
  position: absolute;
  inset: 0 0 auto 0;
  padding: 8px 12px;
  background: rgba(23, 20, 26, 0.66);
  opacity: 0;
  transition: opacity 220ms ease-out;
}

.frameTopTitle {
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  font-weight: 600;
  font-size: 11px;
  line-height: 1.3;
  color: #fff7e6;
  opacity: 0.96;
}

.frameBottom {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(23, 20, 26, 0.66);
  opacity: 0;
  transition: opacity 220ms ease-out;
}

.progressTrack {
  flex: 1 1 auto;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 247, 230, 0.3);
  overflow: hidden;
}

.progressFill {
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: #fff7e6;
}

.timeLabel {
  flex: 0 0 auto;
  font-family: "Space Mono", ui-monospace, monospace;
  font-weight: 700;
  font-size: 9px;
  line-height: 1.3;
  color: #fff7e6;
  opacity: 0.96;
}

.card[data-state=frame] .badgeLite,
.card[data-state=frame] .cardTitleLite,
.card[data-state=frame] .playBtn {
  opacity: 0;
}

.card[data-state=frame] .frameTop,
.card[data-state=frame] .frameBottom {
  opacity: 1;
}

.readout {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: #fff7e6;
  color: #17141a;
  font-family: "Space Mono", ui-monospace, monospace;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.3;
}

@media (max-width: 340px) {
  .thumbWrap {
    width: 138px;
  }
  .playIcon {
    width: 22px;
    height: 22px;
  }
  .badgeLite {
    font-size: 8px;
  }
  .cardTitleLite {
    font-size: 10px;
  }
  .frameTopTitle {
    font-size: 10px;
  }
  .timeLabel {
    font-size: 8px;
  }
  .readout {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .playBtn,
  .badgeLite,
  .cardTitleLite,
  .frameTop,
  .frameBottom {
    transition: none;
  }
}
