.cookie-intro {
  color: rgba(255, 215, 0, 0.7);
  font-size: 0.85rem;
  text-align: center;
  margin: -5px 0 20px;
  font-style: italic;
}

.cookie-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0 10px;
  min-height: 300px;
}

.cookie-shio {
  text-align: center;
  margin-bottom: 10px;
  animation: cFadeIn 0.5s ease-out;
}

.cookie-shio-hanzi {
  display: block;
  font-size: 2.2rem;
  color: #ffd700;
  line-height: 1;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.cookie-shio-name {
  display: block;
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 1px;
  margin-top: 6px;
}

.cookie {
  position: relative;
  width: 220px;
  height: 200px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
}

.cookie-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180px;
  height: 180px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 215, 0, 0.28) 0%,
    rgba(255, 140, 0, 0.1) 45%,
    transparent 70%
  );
  animation: cPulse 2.6s ease-in-out infinite;
  pointer-events: none;
}

.cookie-half {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  line-height: 1;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55));
  transition: transform 0.7s cubic-bezier(0.34, 1.3, 0.64, 1), opacity 0.7s ease;
}

.cookie-half-left {
  clip-path: inset(0 50% 0 0);
}

.cookie-half-right {
  clip-path: inset(0 0 0 50%);
}

.cookie:not(.cracked):hover .cookie-half {
  animation: cWiggle 0.5s ease-in-out infinite;
}

.cookie:not(.cracked):active .cookie-half {
  transform: scale(0.94);
}

.cookie.shaking .cookie-half,
.cookie.shaking:not(.cracked):hover .cookie-half {
  animation: cShake 0.45s ease-in-out;
}

.cookie.cracked {
  cursor: default;
}

.cookie.cracked .cookie-glow {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.cookie.cracked .cookie-half-left {
  transform: translateX(-110px) rotate(-38deg);
  opacity: 0;
}

.cookie.cracked .cookie-half-right {
  transform: translateX(110px) rotate(38deg);
  opacity: 0;
}

.cookie-hint {
  color: rgba(255, 215, 0, 0.75);
  font-family: "Cinzel", serif;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  margin: 8px 0 0;
  animation: cFloat 2s ease-in-out infinite;
  transition: opacity 0.3s ease;
}

.cookie-hint i {
  margin-right: 6px;
}

.cookie-hint.faded {
  opacity: 0;
}

.cookie-slip {
  background: linear-gradient(160deg, #fdf6e3 0%, #f3e6c8 55%, #e8d7ae 100%);
  border-radius: 6px;
  padding: 0;
  margin: 0 auto;
  max-width: 520px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 30px rgba(255, 215, 0, 0.12);
  position: relative;
  overflow: hidden;
  transform-origin: top center;
  animation: cSlipOut 0.65s cubic-bezier(0.22, 1.2, 0.5, 1);
}

.slip-tear {
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    rgba(180, 150, 90, 0.35) 0 6px,
    transparent 6px 12px
  );
  border-bottom: 1px dashed rgba(150, 120, 70, 0.45);
}

.slip-body {
  padding: 28px 30px 24px;
  text-align: center;
}

.slip-seal {
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #b8860b;
  background: rgba(184, 134, 11, 0.12);
  border: 1px dashed rgba(184, 134, 11, 0.5);
}

.slip-message {
  color: #3b2f1c;
  font-family: "Cinzel", serif;
  font-size: 1.1rem;
  line-height: 1.65;
  margin: 0 0 22px;
}

.slip-lucky {
  border-top: 1px dashed rgba(150, 120, 70, 0.45);
  border-bottom: 1px dashed rgba(150, 120, 70, 0.45);
  padding: 16px 10px;
  margin-bottom: 18px;
}

.slip-lucky-label {
  display: block;
  color: #8b6914;
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.slip-lucky-text {
  color: #5c4a2a;
  font-size: 0.98rem;
  font-style: italic;
  line-height: 1.5;
  margin: 0;
}

.slip-note {
  color: rgba(92, 74, 42, 0.7);
  font-size: 0.75rem;
  margin: 0;
}

.slip-note i {
  margin-right: 5px;
}

@media (max-width: 600px) {
  .cookie {
    width: 180px;
    height: 165px;
  }

  .cookie-half {
    font-size: 6.5rem;
  }

  .cookie.cracked .cookie-half-left {
    transform: translateX(-80px) rotate(-38deg);
  }

  .cookie.cracked .cookie-half-right {
    transform: translateX(80px) rotate(38deg);
  }

  .slip-body {
    padding: 22px 20px 20px;
  }

  .slip-message {
    font-size: 1rem;
  }
}

@keyframes cFadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes cSlipOut {
  from { opacity: 0; transform: translateY(-30px) scaleY(0.75); }
  to { opacity: 1; transform: translateY(0) scaleY(1); }
}

@keyframes cPulse {
  0%, 100% { opacity: 0.55; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
}

@keyframes cFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes cWiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-4deg); }
  75% { transform: rotate(4deg); }
}

@keyframes cShake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  20% { transform: translateX(-7px) rotate(-5deg); }
  40% { transform: translateX(7px) rotate(5deg); }
  60% { transform: translateX(-5px) rotate(-3deg); }
  80% { transform: translateX(5px) rotate(3deg); }
}
