* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
  background: var(--gyu-bg, #fff9c4);
  transition: background-color 2.8s ease;
}

body {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 19px;
  color: #000000;
  display: flex;
  justify-content: center;
}

.start {
  width: 390px;
  max-width: 100vw;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.start[hidden] {
  display: none;
}

.start-btn {
  width: auto;
  min-width: 120px;
  padding: 0 16px;
}

.screen {
  position: relative;
  width: 390px;
  max-width: 100vw;
  min-height: 100dvh;
  margin: 0 auto;
}

.screen[hidden] {
  display: none;
}

.photo {
  position: absolute;
  width: 190px;
  height: 180px;
  left: calc(50% - 190px / 2 + 0.5px);
  top: 96px;
  object-fit: cover;
  display: block;
  background: #d9d9d9;
}

.question {
  position: absolute;
  width: 165px;
  height: 57px;
  left: calc(50% - 165px / 2 + 21px);
  top: 333px;
  font-family: "Inter", sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 19px;
  color: #000000;
}

.actions {
  position: absolute;
  left: 74px;
  right: 79px;
  top: 435px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.btn {
  width: 87px;
  height: 44px;
  background: #d9d9d9;
  border: 1px solid #000000;
  font-family: "Inter", sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 19px;
  color: #000000;
  cursor: pointer;
  appearance: none;
}

.btn:active {
  opacity: 0.85;
}

.modal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  overflow: hidden;
}

.modal[hidden] {
  display: none;
}

.modal.is-open::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 80, 80, 0.35);
  animation: flashBang 0.9s ease-out;
  pointer-events: none;
}

.modal-box {
  box-sizing: border-box;
  position: relative;
  width: calc(100% - 80px);
  height: 267px;
  background: #ffffff;
  border: 1px solid #000000;
  border-radius: 23px;
  opacity: 0;
  transform-origin: center center;
}

.modal.is-open .modal-box {
  animation: whooshBounce 1.15s cubic-bezier(0.22, 1.4, 0.36, 1) forwards;
}

.modal.is-open .modal-photo {
  animation: photoWiggle 0.55s ease-in-out 0.75s 3;
}

.modal.is-open .modal-text {
  animation: textPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) 0.85s both;
}

.screen.is-shaking {
  animation: screenShake 0.65s ease-in-out;
}

.modal-photo {
  position: absolute;
  width: 170px;
  height: 194px;
  left: calc(50% - 170px / 2 + 0.5px);
  top: 6px;
  object-fit: cover;
  display: block;
}

.modal-text {
  position: absolute;
  width: 135px;
  height: 19px;
  left: calc(50% - 135px / 2 + 49px);
  top: 220px;
  font-family: "Inter", sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 19px;
  color: #000000;
}

@keyframes whooshBounce {
  0% {
    opacity: 0;
    transform: translate(140%, -160%) rotate(-540deg) scale(0.15);
  }
  55% {
    opacity: 1;
    transform: translate(0, 0) rotate(18deg) scale(1.22);
  }
  68% {
    transform: translate(0, 0) rotate(-12deg) scale(0.88);
  }
  78% {
    transform: translate(0, 0) rotate(8deg) scale(1.12);
  }
  88% {
    transform: translate(0, 0) rotate(-4deg) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
}

@keyframes flashBang {
  0% {
    opacity: 0;
  }
  18% {
    opacity: 1;
    background: rgba(255, 255, 255, 0.85);
  }
  40% {
    opacity: 0.7;
    background: rgba(255, 60, 60, 0.45);
  }
  100% {
    opacity: 0;
  }
}

@keyframes screenShake {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  10% {
    transform: translate(-10px, 4px) rotate(-1.5deg);
  }
  20% {
    transform: translate(12px, -6px) rotate(1.8deg);
  }
  30% {
    transform: translate(-8px, 8px) rotate(-1.2deg);
  }
  40% {
    transform: translate(9px, -3px) rotate(1deg);
  }
  50% {
    transform: translate(-6px, 5px) rotate(-0.8deg);
  }
  60% {
    transform: translate(5px, -4px) rotate(0.6deg);
  }
  70% {
    transform: translate(-3px, 2px) rotate(-0.4deg);
  }
  80% {
    transform: translate(2px, -1px) rotate(0.2deg);
  }
}

@keyframes photoWiggle {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(-8deg) scale(1.06);
  }
  75% {
    transform: rotate(8deg) scale(1.06);
  }
}

@keyframes textPop {
  0% {
    opacity: 0;
    transform: scale(0.2) rotate(-12deg);
  }
  70% {
    opacity: 1;
    transform: scale(1.25) rotate(4deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.kick {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: transparent;
  overflow: hidden;
  pointer-events: none;
}

.kick[hidden] {
  display: none;
}

.feet {
  position: absolute;
  width: 204px;
  height: 306px;
  left: calc(50% - 204px / 2 + 0.5px);
  top: 163px;
  object-fit: contain;
  transform-origin: center center;
  transform: scale(0.72) rotate(0deg);
  will-change: transform;
  --rot-start: 0deg;
  --rot-peak: 0deg;
  --rot-end: 0deg;
  --scale-peak: 1.38;
  pointer-events: none;
}

.feet.is-pulsing {
  animation: feetPulse 0.72s ease-in-out forwards;
}

.star {
  position: absolute;
  background: #ff2a2a;
  clip-path: polygon(
    50% 0%,
    61% 35%,
    98% 35%,
    68% 57%,
    79% 91%,
    50% 70%,
    21% 91%,
    32% 57%,
    2% 35%,
    39% 35%
  );
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.08s linear, transform 0.08s linear;
  pointer-events: none;
  z-index: 21;
}

.star.is-on {
  opacity: 1;
  transform: scale(1);
}

.star-1 {
  width: 101px;
  height: 53px;
  left: 68px;
  top: 262px;
}

.star-2 {
  width: 98px;
  height: 93px;
  left: 93px;
  top: 293px;
}

.wait-btn {
  position: absolute;
  left: calc(50% - 149px / 2);
  top: 266px;
  width: 149px;
  height: 105px;
  box-sizing: border-box;
  background: #444444;
  border: 1px solid #000000;
  border-radius: 50%;
  font-family: "Inter", sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 19px;
  color: #ffffff;
  cursor: pointer;
  appearance: none;
  z-index: 30;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 8px;
}

.wait-btn[hidden] {
  display: none;
}

.wait-btn:active {
  opacity: 0.85;
}

@keyframes feetPulse {
  0% {
    transform: scale(0.72) rotate(var(--rot-start));
  }
  50% {
    transform: scale(var(--scale-peak)) rotate(var(--rot-peak));
  }
  100% {
    transform: scale(0.72) rotate(var(--rot-end));
  }
}

body.is-pink,
html.is-pink {
  background: var(--gyu-yes-bg, #ffb6c8);
}

.admin-fab {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 999;
  padding: 10px 14px;
  background: #222;
  color: #fff;
  text-decoration: none;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  border: 1px solid #000;
  opacity: 0.85;
}

.admin-fab:hover {
  opacity: 1;
}

html.is-embed .admin-fab,
.admin-fab[hidden],
html.is-live-preview .admin-fab {
  display: none !important;
}

.preview-actions[hidden] {
  display: none !important;
}

.preview-actions {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 999;
  display: grid;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto;
}

.preview-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #000;
  background: #fff;
  color: #111;
  text-decoration: none;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.preview-action.primary {
  background: #222;
  color: #fff;
}

.deploy-sheet[hidden] {
  display: none !important;
}

.deploy-sheet {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.deploy-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  padding: 0;
  cursor: pointer;
}

.deploy-sheet-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  background: #fffdf8;
  border: 1px solid #d9d0c2;
  border-radius: 18px 18px 0 0;
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.2);
  animation: deploySheetUp 0.28s ease-out;
  font-family: "Inter", sans-serif;
}

.deploy-sheet-card strong {
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
  color: #1c1915;
}

.deploy-sheet-hint {
  margin: 0;
  font-size: 12px;
  color: #6d6458;
}

.deploy-sheet-card input {
  width: 100%;
  font: inherit;
  font-size: 13px;
  padding: 10px 12px;
  border: 1px solid #d9d0c2;
  background: #fff;
  margin: 12px 0;
  box-sizing: border-box;
}

.deploy-sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.deploy-sheet-actions a,
.deploy-sheet-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid #111;
  background: #fff;
  color: #111;
  text-decoration: none;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

@keyframes deploySheetUp {
  from {
    transform: translateY(28px);
    opacity: 0.7;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 420px) {
  .deploy-sheet-actions {
    grid-template-columns: 1fr;
  }
}

.yes-scene {
  position: relative;
  width: 390px;
  max-width: 100vw;
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yes-scene[hidden] {
  display: none;
}

.yes-photo {
  position: relative;
  z-index: 2;
  width: min(78vw, 300px);
  max-width: 300px;
  height: auto;
  opacity: 0;
  transform: scale(0.18);
  transform-origin: center center;
  pointer-events: none;
}

.yes-photo.is-show {
  animation: yesPhotoIn 4.5s ease-out forwards;
}

.yes-photo.is-fade-out {
  animation: yesPhotoOut 1.1s ease-in forwards;
  pointer-events: none;
}

.usagi-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.usagi {
  position: absolute;
  width: 120px;
  height: auto;
  opacity: 0;
  pointer-events: none;
  transform: rotate(-25deg) scale(0.85);
}

.usagi.is-fly {
  animation-duration: 2.4s;
  animation-timing-function: ease-in;
  animation-fill-mode: forwards;
}

.usagi.path-a.is-fly {
  animation-name: usagiFlyA;
}

.usagi.path-b.is-fly {
  animation-name: usagiFlyB;
}

.usagi.path-c.is-fly {
  animation-name: usagiFlyC;
}

.wander {
  position: absolute;
  z-index: 6;
  width: 140px;
  height: auto;
  pointer-events: none;
  will-change: left, top, transform;
}

.wander[hidden] {
  display: none;
}

.congrats {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: min(86vw, 320px);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-180deg) scale(0.2);
}

.congrats[hidden] {
  display: none;
}

.congrats.is-show {
  display: flex;
  animation: congratsSpinIn 1.4s cubic-bezier(0.22, 1.2, 0.36, 1) forwards;
}

.congrats.is-fade {
  display: flex;
  animation: congratsFadeIn 2.2s ease-out forwards;
}

.congrats.is-fade .congrats-photo {
  max-width: 320px;
  width: min(92vw, 320px);
}

.congrats.is-boom {
  display: flex;
  animation: congratsBoom 1.1s cubic-bezier(0.15, 1.6, 0.35, 1) forwards;
}

.congrats.is-boom .congrats-photo {
  max-width: 340px;
  width: min(94vw, 340px);
  animation: photoBoomFlash 0.85s ease-out;
}

.congrats.is-boom .congrats-text {
  animation: textBoomPop 0.7s cubic-bezier(0.2, 1.5, 0.4, 1) 0.15s both;
}

.yes-scene.is-booming::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 80, 120, 0.55) 40%, transparent 70%);
  animation: boomFlash 0.9s ease-out forwards;
}

.yes-scene.is-booming {
  animation: boomShake 0.7s ease-in-out;
}

.congrats-photo {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
}

.congrats-text {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: clamp(28px, 8vw, 40px);
  line-height: 1.25;
  text-align: center;
  color: #fff;
  text-shadow:
    0 0 10px #ff4d6d,
    0 2px 0 #ff2a5a,
    2px 2px 0 #000;
  white-space: pre-line;
}

.congrats-text.is-hyper {
  font-size: clamp(36px, 11vw, 56px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff45a;
  -webkit-text-stroke: 2px #ff1f6b;
  text-shadow:
    0 0 18px #ff4d6d,
    0 0 36px #ff90b3,
    4px 4px 0 #ff1f6b,
    -3px 3px 0 #ff7ab0,
    0 8px 0 #c4004a;
  animation: hyperTextBounce 0.9s cubic-bezier(0.2, 1.6, 0.4, 1) both,
    hyperTextGlow 1.1s ease-in-out 0.9s infinite alternate;
}

.congrats.is-love-more {
  display: flex;
  animation: congratsBoom 1s cubic-bezier(0.15, 1.6, 0.35, 1) forwards;
}

.congrats.is-love-more .congrats-photo {
  max-width: 340px;
  width: min(94vw, 340px);
  animation: photoBoomFlash 0.8s ease-out;
}

.congrats.is-tear {
  display: flex;
  animation: congratsTearIn 3.5s ease-out forwards;
}

.congrats.is-tear .congrats-photo {
  max-width: 320px;
  width: min(92vw, 320px);
}

.congrats-text.is-tear-text,
.congrats-text.fx-soft {
  font-weight: 400;
  -webkit-text-stroke: 0;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.7),
    0 1px 2px rgba(0, 0, 0, 0.45);
  animation: none;
}

.congrats-text.fx-none {
  text-shadow: none;
  -webkit-text-stroke: 0;
}

.congrats-text.fx-glow {
  text-shadow:
    0 0 10px currentColor,
    0 0 22px rgba(255, 77, 109, 0.8),
    2px 2px 0 rgba(0, 0, 0, 0.35);
}

.congrats-text.fx-shadow {
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.45);
}

.congrats-text.fx-stroke {
  -webkit-text-stroke: 1.5px #111;
  text-shadow: none;
}

.congrats-text.fx-hyper {
  font-weight: 900;
}

.tear-bottom {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 9;
  width: min(88vw, 300px);
  height: auto;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
}

.tear-bottom[hidden] {
  display: none;
}

.tear-bottom.is-show {
  display: block;
  animation: tearBottomIn 2.8s ease-out forwards;
}

.fireworks {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.fw-burst {
  position: absolute;
  width: 0;
  height: 0;
}

.fw-spark {
  position: absolute;
  left: 0;
  top: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
  animation: fwSpark linear forwards;
  opacity: 0;
}

@keyframes yesPhotoIn {
  0% {
    opacity: 0;
    transform: scale(0.18);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes yesPhotoOut {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.04);
  }
}

@keyframes usagiFlyA {
  0% {
    opacity: 1;
    left: -22%;
    top: -12%;
    transform: rotate(-40deg) scale(0.9);
  }
  100% {
    opacity: 1;
    left: 78%;
    top: 78%;
    transform: rotate(720deg) scale(1.15);
  }
}

@keyframes usagiFlyB {
  0% {
    opacity: 1;
    left: 110%;
    top: -8%;
    transform: rotate(50deg) scale(0.85);
  }
  100% {
    opacity: 1;
    left: -18%;
    top: 72%;
    transform: rotate(-680deg) scale(1.2);
  }
}

@keyframes usagiFlyC {
  0% {
    opacity: 1;
    left: -18%;
    top: 88%;
    transform: rotate(20deg) scale(0.8);
  }
  100% {
    opacity: 1;
    left: 82%;
    top: -10%;
    transform: rotate(760deg) scale(1.1);
  }
}

@keyframes congratsSpinIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-220deg) scale(0.15);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(18deg) scale(1.08);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
  }
}

@keyframes congratsFadeIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes congratsBoom {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.05) rotate(-30deg);
  }
  35% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.45) rotate(12deg);
  }
  55% {
    transform: translate(-50%, -50%) scale(0.88) rotate(-8deg);
  }
  72% {
    transform: translate(-50%, -50%) scale(1.18) rotate(5deg);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}

@keyframes photoBoomFlash {
  0% {
    filter: brightness(3) contrast(1.4);
  }
  40% {
    filter: brightness(1.6) contrast(1.2);
  }
  100% {
    filter: brightness(1) contrast(1);
  }
}

@keyframes textBoomPop {
  0% {
    opacity: 0;
    transform: scale(0.2) rotate(-20deg);
  }
  60% {
    opacity: 1;
    transform: scale(1.35) rotate(8deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes boomFlash {
  0% {
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes boomShake {
  0%,
  100% {
    transform: translate(0, 0);
  }
  15% {
    transform: translate(-14px, 8px);
  }
  30% {
    transform: translate(16px, -10px);
  }
  45% {
    transform: translate(-10px, 12px);
  }
  60% {
    transform: translate(12px, -6px);
  }
  75% {
    transform: translate(-6px, 4px);
  }
}

@keyframes hyperTextBounce {
  0% {
    opacity: 0;
    transform: scale(0.1) rotate(-25deg) translateY(40px);
  }
  55% {
    opacity: 1;
    transform: scale(1.35) rotate(8deg) translateY(-8px);
  }
  75% {
    transform: scale(0.92) rotate(-4deg) translateY(4px);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg) translateY(0);
  }
}

@keyframes hyperTextGlow {
  0% {
    filter: hue-rotate(0deg) brightness(1);
    transform: scale(1) rotate(-1deg);
  }
  100% {
    filter: hue-rotate(25deg) brightness(1.15);
    transform: scale(1.06) rotate(1deg);
  }
}

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

@keyframes tearBottomIn {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(24px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes fwSpark {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.4);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(0.15);
  }
}
