.oc-wrap {
  margin-top: 10px;
}

#ocStage {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--ink-2);
  padding: 28px 24px 24px;
  overflow: hidden;
}

.oc-svg {
  width: 100%;
  height: auto;
  display: block;
}

.oc-body {
  fill: url(#ocGlaze);
  stroke: #0b1e3f;
  stroke-width: 2;
}

g.hole {
  cursor: pointer;
}

g.hole .core {
  stroke: #22301f;
  stroke-width: 2;
  transition: filter 0.2s;
}

g.hole .ring {
  fill: none;
  stroke: var(--gold-hi);
  stroke-width: 2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

g.hole.lit .ring {
  animation: ringout 0.65s ease-out;
}

@keyframes ringout {
  0% {
    opacity: 0.95;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(2.5);
  }
}

g.hole.lit .core {
  filter: brightness(1.4);
}

g.hole text {
  fill: var(--parch-dim);
  font-family: var(--mono);
  font-size: 15px;
  text-anchor: middle;
  pointer-events: none;
}

.oc-keys {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.okey {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--gold-hi);
  background: rgba(214, 178, 94, 0.08);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: transform 0.1s var(--ease-out), background 0.15s var(--ease-out);
}

.okey:hover {
  background: rgba(214, 178, 94, 0.16);
}

.okey.press {
  transform: translateY(2px);
  background: rgba(214, 178, 94, 0.28);
}

.oc-score {
  margin-top: 22px;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 20px;
  border-top: 1px dashed var(--line);
  padding-top: 18px;
}

.oc-score span {
  min-width: 1.25em;
  text-align: center;
  border-bottom: 1px solid var(--line);
  padding: 0 3px;
  color: var(--parch-dim);
  transition: color 0.3s, border-color 0.3s;
}

.oc-score span.filled {
  color: var(--parch);
  border-color: var(--gold);
}

.oc-score.flash span {
  color: var(--gold-hi);
  border-color: var(--gold-hi);
  text-shadow: 0 0 18px rgba(242, 217, 146, 0.95);
}

.ohint {
  margin-top: 16px;
  font-size: 13px;
  color: var(--parch-dim);
  text-align: center;
  font-style: italic;
}

.ohint b {
  color: var(--gold-hi);
  font-style: normal;
  font-family: var(--mono);
  letter-spacing: 0.2em;
}

.fnote {
  position: absolute;
  pointer-events: none;
  z-index: 50;
  animation: nfloat var(--dur, 1.6s) ease-out forwards;
  will-change: transform, opacity;
}

@keyframes nfloat {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.4) rotate(0deg);
  }
  14% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx, 0px), -130px) scale(1) rotate(var(--rot, 0deg));
  }
}

.oc-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  max-width: min(90vw, 480px);
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(20, 27, 21, 0.96);
  color: var(--gold-hi);
  font-family: var(--mono);
  font-size: 13px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
  z-index: 100;
}

.oc-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .fnote {
    animation: nfloat-fade 0.2s ease-out forwards;
  }
}

@keyframes nfloat-fade {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

@keyframes slot-pop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}

.oc-score span.pop {
  animation: slot-pop 0.16s var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  .oc-score span.pop {
    animation: none;
  }
}

.time-flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  background: radial-gradient(
    ellipse 70% 60% at 50% 40%,
    rgba(242, 217, 146, 0.28),
    rgba(125, 180, 240, 0.12) 55%,
    transparent 75%
  );
  opacity: 0;
  animation: time-wash 1.4s ease-out forwards;
}

@keyframes time-wash {
  0% {
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.tmote {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, #fff8e3 0%, var(--gold-hi) 45%, transparent 70%);
  opacity: 0;
  animation: tmote-rise var(--dur, 2.4s) ease-out forwards;
  animation-delay: var(--delay, 0s);
  will-change: transform, opacity;
}

.tmote.blue {
  background: radial-gradient(circle, #e8f3ff 0%, #7db4f0 45%, transparent 70%);
}

@keyframes tmote-rise {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.5);
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx, 0px), calc(-1 * var(--rise, 220px))) scale(1);
  }
}
