/* 연산마스터 오프닝 — PLUS → MASTERY */
@font-face { font-family: YmReel; src: url("/math/opening/fonts/ym-reel-500.woff2") format("woff2"); font-weight: 500; font-display: block; }
@font-face { font-family: YmReel; src: url("/math/opening/fonts/ym-reel-700.woff2") format("woff2"); font-weight: 700; font-display: block; }
@font-face { font-family: YmReel; src: url("/math/opening/fonts/ym-reel-900.woff2") format("woff2"); font-weight: 900; font-display: block; }

.ym-op {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: #0b0b0c;
  overflow: hidden;
  opacity: 1;
  transition: opacity .5s ease;
}
.ym-op.is-out { opacity: 0; pointer-events: none; }
.ym-op-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.ym-op-ui {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
  mix-blend-mode: difference;
}
.ym-op-ui > * { pointer-events: auto; }
.ym-op-progress {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,.16);
  overflow: hidden;
}
.ym-op-progress > i {
  display: block;
  height: 100%;
  width: 0;
  background: rgba(255,255,255,.7);
}
.ym-op-sound,
.ym-op-skip {
  margin: 0;
  border: 1px solid rgba(255,255,255,.35);
  background: transparent;
  color: rgba(255,255,255,.85);
  border-radius: 999px;
  cursor: pointer;
  font-family: YmReel, "Noto Sans KR", sans-serif;
}
.ym-op-sound { width: 36px; height: 36px; font-size: 14px; }
.ym-op-sound[aria-pressed="true"] { background: rgba(255,255,255,.9); color: #000; }
.ym-op-skip { padding: 8px 14px; font-size: 12px; font-weight: 700; }
.ym-op-sound:hover,
.ym-op-skip:hover,
.ym-op-sound:focus-visible,
.ym-op-skip:focus-visible { outline: none; border-color: #fff; }

.ym-op-replay {
  position: fixed;
  top: calc(58px + env(safe-area-inset-top, 0px));
  right: 14px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 7px 12px 7px 10px;
  border: 1px solid rgba(247,243,236,.2);
  border-radius: 999px;
  background: rgba(12,18,26,.32);
  backdrop-filter: blur(8px);
  color: rgba(247,243,236,.78);
  font-family: YmReel, "Noto Sans KR", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  opacity: .82;
  transition: opacity .2s ease, transform .2s ease, color .2s ease, background .2s ease, border-color .2s ease;
}
.ym-op-replay::before { content: "+"; font-size: 13px; font-weight: 900; color: #e8a33d; }
.ym-op-replay:hover,
.ym-op-replay:focus-visible { opacity: 1; transform: translateY(-1px); outline: none; }
.ym-op-replay.is-on-light {
  color: rgba(21,32,43,.72);
  background: rgba(244,239,230,.78);
  border-color: rgba(21,32,43,.14);
}
.ym-op-replay.is-on-light::before { color: #b97a1f; }
body.ym-op-playing .ym-op-replay { display: none; }

@media (max-width: 640px) {
  .ym-op-replay {
    top: calc(56px + env(safe-area-inset-top, 0px));
    right: 10px;
    font-size: 11px;
    padding: 6px 10px 6px 9px;
  }
}
