/* proposal.css — build-up, ring box, question card, Yes and the runaway No.
   Transform owners: .pp-yes-wrap = grow · .pp-yes = press / wiggle · .pp-no-float = position + shrink · .pp-no = press / wiggle
   · .pp-box-wrap = float · .pp-card = entrance. */

.pp-inner { justify-content: center; }
.pp-buildup {
  width: 100%;
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0 12px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.pp-buildup > * { grid-area: 1 / 1; }
.pp-line {
  max-width: 22ch;
  font-size: clamp(22px, 6.4vw, 30px);
  font-style: italic;
  line-height: 1.35;
  color: #fff;
  text-shadow: var(--text-shadow);
  animation: ppLineIn 1s var(--ease-out) both;
}
.pp-line.is-first { font-size: clamp(28px, 8vw, 38px); }
.pp-line.is-out { animation: ppLineOut .5s ease forwards; }
@keyframes ppLineIn { 0% { opacity: 0; transform: translateY(14px); filter: blur(4px); } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes ppLineOut { to { opacity: 0; transform: translateY(-16px); } }
.pp-buildup.is-static .pp-line { animation: fadeIn .3s ease both; }

.pp-stage { display: flex; flex-direction: column; align-items: center; width: 100%; }
.pp-stage.is-in .pp-card { animation: cardIn .7s var(--ease-out) both; }
.pp-stage.is-in .pp-box-wrap { animation: fadeIn .8s var(--ease-out) .2s both; }

/* ----- the closed ring box, floating above the card ----- */
.pp-box-wrap { margin-bottom: 18px; }
.pp-box { position: relative; width: 76px; height: 58px; animation: float 6s ease-in-out infinite; }
.pp-box-base {
  position: absolute; left: 0; right: 0; bottom: 0; height: 60%;
  border-radius: 6px 6px 12px 12px;
  background: linear-gradient(#7a1033, #4a0619);
  box-shadow: 0 14px 26px rgba(40, 0, 15, .45), inset 0 -3px 6px rgba(0, 0, 0, .35);
}
.pp-box-lid {
  position: absolute; left: -2px; right: -2px; top: 0; height: 44%;
  border-radius: 14px 14px 5px 5px;
  background: linear-gradient(#93163f, #5e0a24);
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, .18);
  z-index: 1;
}
.pp-box-seam { position: absolute; left: 4px; right: 4px; top: 42%; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--gold-deep), var(--gold-hi), var(--gold-deep)); z-index: 2; }

/* ----- the question card ----- */
.pp-card { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; padding: 30px 22px 24px; }
.pp-kicker { font-size: 16px; font-style: italic; color: var(--ink-soft); line-height: 1.45; max-width: 30ch; }
.pp-question { font-size: clamp(32px, 9vw, 52px); font-weight: 700; line-height: 1.12; color: var(--ink); }
.pp-buttons { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; min-height: 60px; }
.pp-buttons.is-arming .pp-yes, .pp-buttons.is-arming .pp-no { pointer-events: none; }
.pp-caption { min-height: 22px; font-size: 15px; font-weight: 500; color: var(--ink-soft); }
.pp-caption.is-in { animation: fadeIn .5s ease both; }

.pp-yes-wrap { display: inline-block; transform: scale(var(--grow, 1)); transition: transform .35s var(--ease-back); transform-origin: 50% 50%; }
.pp-yes { min-width: 120px; font-size: 18px; padding: 14px 30px; }
.pp-yes.is-wiggle { animation: wiggle .3s ease-out, yesGlow 2.2s ease-in-out infinite; }
.pp-yes.is-nudge { animation: ppNudge 1.2s ease-in-out 2, yesGlow 2.2s ease-in-out infinite; }
@keyframes ppNudge { 0%, 100% { box-shadow: 0 8px 22px var(--glow-lo); } 50% { box-shadow: 0 0 0 10px rgba(255, 90, 130, .25), 0 14px 44px var(--glow-hi); } }

.pp-no-slot { display: inline-flex; align-items: center; justify-content: center; }
/* top-level selectors: the No button is moved to <body> when it breaks free */
.pp-no {
  max-width: min(78vw, 280px);
  min-width: 88px;
  padding: 13px 22px;
  background: #fff;
  color: var(--rose-700);
  border: 1.5px solid rgba(122, 18, 51, .18);
  box-shadow: var(--shadow-btn);
  font-size: 16px;
  white-space: normal;
  text-wrap: balance;
  touch-action: none;
  transition: opacity .15s ease, background-color .6s ease, color .6s ease;
}
.pp-no.is-wiggle { animation: wiggle .3s ease-out; }
.pp-no.is-hidden { opacity: 0; }
.pp-no.is-yes {
  background: linear-gradient(135deg, #ff5a82, #E91E63 60%, #C2185B);
  color: #fff;
  border-color: transparent;
  touch-action: manipulation;
  animation: yesGlow 2.2s ease-in-out infinite;
}
.pp-no-float {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 45;
  transform-origin: 0 0;
  transition-property: transform;
  transition-timing-function: var(--ease-back);
  will-change: transform;
}
.pp-no-float.is-poof, .pp-no.is-poof { opacity: 0; transition: opacity .35s ease; }

@media (max-width: 359px) {
  .pp-buttons.is-surrendered { flex-direction: column; }
}
@media (max-height: 560px) {
  .pp-box-wrap { display: none; }
  .pp-card { gap: 12px; padding: 22px 18px 18px; }
  .pp-question { font-size: clamp(28px, 7vh, 40px); }
  .pp-kicker { font-size: 14px; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .pp-card { flex-direction: row; flex-wrap: wrap; justify-content: center; width: min(94vw, 720px); }
  .pp-kicker { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .pp-yes-wrap { transition: none; }
  .pp-no-float { transition: none !important; }
  .pp-box { animation: none; }
  .pp-stage.is-in .pp-card, .pp-stage.is-in .pp-box-wrap { animation: fadeIn .3s ease both !important; animation-duration: .3s !important; }
}
