* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none;
}

.media {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
}

.badge {
  position: absolute;
  top: env(safe-area-inset-top, 10px);
  right: 12px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.75rem;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
}

.caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
  color: #fff;
  font-size: 1.15rem;
  line-height: 1.4;
  text-align: center;
}

.caption.final {
  font-weight: 600;
  font-size: 1.4rem;
}

#scratch-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  transition: opacity 0.6s ease;
}

#scratch-canvas.scratch-canvas--revealed {
  opacity: 0;
  pointer-events: none;
}

.scratch-hint {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #3d3a35;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  padding: 0 32px;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.scratch-hint__icon {
  font-size: 2.2rem;
  animation: scratch-hint-bounce 1.4s ease-in-out infinite;
}

.scratch-hint--hidden {
  opacity: 0;
}

@keyframes scratch-hint-bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-6px) rotate(-8deg); }
  75% { transform: translateY(-6px) rotate(8deg); }
}
