.rainette-game {
  max-width: 960px;
  margin: 1.5rem auto;
  background: #1a1a1a;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}
.rainette-stage {
  position: relative;
  overflow: hidden;
  background: #111;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  aspect-ratio: 4 / 3;
}
.rainette-slide {
  display: none;
  position: relative;
  line-height: 0;
}
.rainette-slide.active {
  display: block;
}
.rainette-slide img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}
.rainette-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.rainette-cercle {
  position: absolute;
  box-sizing: border-box;
  border: 3px solid #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(34,197,94,0.5);
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.3s;
}
.rainette-croix {
  position: absolute;
  pointer-events: none;
  z-index: 3;
}
.rainette-croix svg {
  display: block;
}
.rainette-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  background: #2a2a2a;
  color: #ddd;
  font-size: 1.1rem;
  flex-wrap: wrap;
}
.rainette-bar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.rainette-bar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.rainette-bar button {
  background: #444;
  border: none;
  color: #fff;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}
.rainette-bar button:hover {
  background: #666;
}
.rainette-idx {
  min-width: 64px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 1.1rem;
}
.rainette-score {
  color: #a3e635;
  font-weight: 600;
  white-space: nowrap;
  font-size: 1.1rem;
}

/* Zoom hint */
.rainette-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.7);
  color: #ccc;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.5s;
}
.rainette-hint.show {
  opacity: 1;
}

/* Frog rain celebration */
.rainette-rain-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  overflow: hidden;
}
.rainette-rain-frog {
  position: absolute;
  top: -40px;
  font-size: 26px;
  pointer-events: none;
  animation: rainette-fall linear forwards;
}
@keyframes rainette-fall {
  0% {
    top: -6%;
    transform: translateX(0px) rotate(0deg);
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    top: 106%;
    transform: translateX(var(--drift, 0px)) rotate(360deg);
    opacity: 0;
  }
}
.rainette-restart-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 1 auto;
  justify-content: center;
  min-width: 0;
}
.rainette-restart-label {
  color: #999;
  font-size: 1rem;
  white-space: nowrap;
}
.rainette-bravo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,0.6);
  z-index: 10;
  pointer-events: none;
  animation: rainette-bravo-in 0.5s ease-out both;
  white-space: nowrap;
}
@keyframes rainette-bravo-in {
  0% { transform: translate(-50%,-50%) scale(0.3); opacity: 0; }
  100% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
}
.rainette-restart {
  background: #22c55e;
  border: none;
  color: #fff;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
  line-height: 1;
}
.rainette-restart:hover {
  background: #16a34a;
}

/* Blink animations */
@keyframes rainette-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}
.rainette-next.rainette-blink {
  animation: rainette-blink 1s ease-in-out infinite;
}
.rainette-restart.rainette-blink {
  animation: rainette-blink 1.2s ease-in-out infinite;
}

@media (max-width: 520px) {
  .rainette-bar { font-size: 0.9rem; padding: 0.6rem 0.7rem; gap: 0.4rem; }
  .rainette-bar button { width: 64px; height: 64px; font-size: 1.5rem; }
  .rainette-bar-left { gap: 0.3rem; }
  .rainette-idx { min-width: 48px; font-size: 0.9rem; }
  .rainette-score { font-size: 0.85rem; }
  .rainette-restart-group { gap: 0.3rem; }
  .rainette-restart-label { font-size: 0.8rem; }
  .rainette-restart { width: 64px; height: 64px; font-size: 1.5rem; }
}
@media (max-width: 400px) {
  .rainette-bar { padding: 0.5rem; gap: 0.3rem; }
  .rainette-bar button { width: 56px; height: 56px; font-size: 1.3rem; }
  .rainette-bar-left { gap: 0.2rem; }
  .rainette-idx { min-width: 36px; font-size: 0.8rem; }
  .rainette-score { font-size: 0.75rem; }
  .rainette-restart-label { font-size: 0.7rem; }
  .rainette-restart { width: 56px; height: 56px; font-size: 1.3rem; }
  .rainette-restart-group { gap: 0.15rem; }
  .rainette-bravo { font-size: 2rem; }
}

/* Editor overrides */
.rainette-game .editor-gallery-add {
  min-height: 0;
  aspect-ratio: auto;
  border: none;
  border-radius: 50%;
}
