.defeat-declaration {
  position:absolute;
  inset:0;
  z-index:46;
  overflow:hidden;
  isolation:isolate;
  container-type:size;
  color:#fff7e8;
  background:#160817;
}
.defeat-declaration[hidden] { display:none; }
.defeat-declaration:is([data-phase="kneel"],[data-phase="stomp"],[data-phase="finale"],[data-phase="complete"]) {
  background:transparent;pointer-events:none;
}
.defeat-declaration:is([data-phase="kneel"],[data-phase="stomp"],[data-phase="finale"],[data-phase="complete"])
  :is(.defeat-declaration-wall,.defeat-declaration-art) { visibility:hidden; }
.defeat-declaration-wall { z-index:0; }
.defeat-declaration-art {
  position:absolute;inset:0;z-index:1;pointer-events:none;
  /* Shared registration; trim the top and leave only a 2px bottom bleed. */
  scale:1;translate:0 0;transform-origin:50% 100%;
}
.defeat-declaration-art img { position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center bottom; }
.defeat-declaration-boy {
  z-index:1;transform-origin:50% 72%;
  animation:defeatDeclarationShiver 230ms linear infinite,defeatDeclarationShudder 3680ms linear infinite;
}
@keyframes defeatDeclarationShiver {
  0%,100% { transform:translate(0,0) rotate(0deg); }
  17% { transform:translate(-.7px,.3px) rotate(-.12deg); }
  39% { transform:translate(.9px,-.3px) rotate(.16deg); }
  54% { transform:translate(-.6px,-.25px) rotate(-.12deg); }
  78% { transform:translate(.8px,.3px) rotate(.12deg); }
  91% { transform:translate(-.9px,.1px) rotate(-.16deg); }
}
/* Boost the last of every 16 fast cycles in phase, so the motions never cancel. */
@keyframes defeatDeclarationShudder {
  0%,93.75%,100% { translate:0 0;rotate:0deg; }
  94.8125% { translate:-.5px .2px;rotate:-.06deg; }
  96.1875% { translate:.6px -.25px;rotate:.08deg; }
  97.125% { translate:-.45px -.2px;rotate:-.06deg; }
  98.625% { translate:.5px .2px;rotate:.06deg; }
  99.4375% { translate:-.55px .1px;rotate:-.08deg; }
}
.defeat-declaration-stand { z-index:2; }
.defeat-declaration-panel {
  position:absolute;
  z-index:3;
  inset:0;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  padding:clamp(12px,3.5vw,28px);
  padding-bottom:max(12px,env(safe-area-inset-bottom));
  pointer-events:none;
}
.defeat-declaration-dialogue .portrait-callout { pointer-events:none; }
.defeat-declaration-dialogue .portrait-callout.left { left:3%; }
.defeat-declaration-dialogue .portrait-callout.right { right:3%; }
.defeat-declaration-dialogue:not(.has-left-callout) .portrait-callout.left,
.defeat-declaration-dialogue:not(.has-right-callout) .portrait-callout.right { display:none; }
.defeat-declaration-dialogue { bottom:76px; }
.defeat-declaration-dialogue .portrait-callout { max-height:calc(100% - 80px); }
.defeat-declaration-sentence {
  position:absolute;z-index:4;left:10%;right:10%;bottom:max(6px,env(safe-area-inset-bottom));
  margin:0 auto;padding:10px 16px;width:fit-content;max-width:80%;border-radius:10px;
  color:#fff;background:rgba(66,17,50,.58);border:1px solid rgba(255,156,200,.34);
  border-radius:4px;box-shadow:0 0 24px rgba(255,91,167,.30),inset 0 0 26px rgba(255,255,255,.07);
  text-shadow:0 2px 4px rgba(0,0,0,.85);
  font-family:inherit;font-size:1.02rem;font-weight:700;line-height:1.35;letter-spacing:.04em;
  pointer-events:auto;cursor:pointer;min-height:44px;
  transition:transform 120ms ease,color 120ms ease,border-color 120ms ease,background 120ms ease;
}
.defeat-declaration-sentence[hidden] { display:none; }
.defeat-declaration[data-motion="still"] *,
.defeat-declaration[data-motion="still"] *::before,
.defeat-declaration[data-motion="still"] *::after { animation:none !important;transition:none !important; }

@media (prefers-reduced-motion:reduce) {
  .defeat-declaration *, .defeat-declaration *::before, .defeat-declaration *::after,
  .wager-bankruptcy-taunt::before,.wager-bankruptcy-taunt .wager-bankruptcy-shoe,
  .wager-bankruptcy-taunt .wager-bankruptcy-step-on-frame,.wager-bankruptcy-taunt .wager-bankruptcy-kneeling-boy { animation:none !important;transition:none !important; }
  .defeat-edge-hearts,.wager-bankruptcy-taunt .wager-bankruptcy-sparks,.wager-bankruptcy-mist,.defeat-knee-puff { display:none !important; }
  .wager-bankruptcy-taunt[data-scene="kneeling"] .wager-bankruptcy-shoe { translate:none !important; }
  .defeat-declaration .defeat-declaration-art { animation:defeatFade 140ms ease both !important; }
  .wager-bankruptcy-taunt .wager-bankruptcy-shoe { animation:defeatFade 140ms ease both !important; }
}

body:has(.defeat-declaration:not([hidden])) .checkmate-banner { visibility:hidden;pointer-events:none; }

/* Preserve the full portrait composition on stacked screens as well. */
@media (max-width:960px) {
  body[data-portrait-camera="1"] .hostess-stage:has(> .defeat-declaration[data-phase="typing"]:not([hidden])) {
    height:max(430px,calc((100vw - 20px) * 660 / 365));
  }
}
@media (max-width:520px) {
  body[data-portrait-camera="1"] .hostess-stage:has(> .defeat-declaration[data-phase="typing"]:not([hidden])) {
    height:calc((100vw - 16px) * 660 / 365);
  }
}


/* Sequence-only presentation; the wager dock keeps its own layout. */
.defeat-declaration-sentence:is(:hover,:focus-visible) {
  color:#fff4fc;border-color:#ff8dcc;transform:translateY(-2px);
  box-shadow:0 0 28px #ff5ba77a,inset 0 0 26px #ffffff0f;
}
.defeat-declaration-sentence:focus-visible { outline:2px solid #ff8dcc;outline-offset:3px; }
.defeat-declaration-sentence:active { transform:scale(.97);background:#a83b79cc;transition-duration:45ms; }
.defeat-declaration-sentence[data-chosen] { animation:defeatChoicePulse 250ms ease both; }
.defeat-declaration:has(.defeat-declaration-sentence[data-chosen]) .defeat-declaration-sentence:not([data-chosen]) { opacity:0; }
.defeat-declaration-sentence:disabled { opacity:.4;cursor:default; }
@keyframes defeatChoicePulse { 45% { transform:scale(1.04);background:#b34983cc;box-shadow:0 0 32px #ff82c7aa; } }
@keyframes defeatSlowPush { from { scale:1;translate:var(--defeat-origin-x,0px) var(--defeat-origin-y,0px); } to { scale:1.05;translate:calc(var(--defeat-origin-x,0px) + 1px) calc(var(--defeat-origin-y,0px) - 2px); } }
@keyframes defeatFade { from { opacity:0; } to { opacity:1; } }
@keyframes defeatHeartbeat { 0%,100% { opacity:.12; } 18% { opacity:.23; } 38% { opacity:.15; } 52% { opacity:.2; } }
.defeat-declaration-art::after,.wager-bankruptcy-taunt::before {
  content:"";position:absolute;inset:0;z-index:3;pointer-events:none;opacity:.16;
  background:radial-gradient(ellipse at center,transparent 48%,#ff6abf 100%);
}
.defeat-declaration[data-motion="full"] .defeat-declaration-art::after,
.wager-bankruptcy-taunt[data-motion="full"]::before { animation:defeatHeartbeat 857ms ease-in-out infinite; }
.defeat-declaration[data-motion="full"] .defeat-declaration-art { animation:defeatSlowPush 20s linear infinite alternate,defeatFade 140ms ease both; }
.defeat-edge-hearts { position:absolute;inset:0;z-index:3;overflow:hidden; }
.defeat-edge-hearts .wager-bankruptcy-spark { animation-name:wagerBankruptcySparkRise; }
.defeat-declaration[data-motion="still"] .defeat-edge-hearts { display:none; }
.wager-bankruptcy-taunt .wager-bankruptcy-shoe {
  inset:0;translate:none;width:100%;height:100%;max-width:none;object-fit:cover;object-position:center bottom;
}
.wager-bankruptcy-taunt .wager-bankruptcy-kneeling-boy {
  bottom:1%;height:43%;max-width:70%;z-index:2;transform-origin:center bottom;
}
.wager-bankruptcy-taunt[data-motion="full"][data-scene="kneeling"] .wager-bankruptcy-kneeling-boy {
  animation:defeatKneelDrop 280ms ease-out both,defeatKneelShake 360ms linear 280ms both;
}
@keyframes wagerBankruptcyKneel {
  0% { opacity:0;transform:translateY(-24px); }
  70% { opacity:1;transform:translateY(4px); }
  100% { opacity:1;transform:translateY(0); }
}
@keyframes defeatKneelTremble { 0%,100% { transform:translateX(0); } 30% { transform:translateX(-1px); } 70% { transform:translateX(1px); } }
.wager-bankruptcy-taunt[data-motion="full"][data-scene="taunt"] .wager-bankruptcy-plane { scale:1;animation:defeatSlowPush 18s linear infinite alternate,defeatFade 140ms ease both; }
.wager-bankruptcy-taunt[data-motion="full"][data-scene="dogeza"] .wager-bankruptcy-shoe { animation:defeatSlowPush 18s linear infinite alternate,defeatFade 140ms ease both; }
.wager-bankruptcy-taunt[data-motion="full"][data-scene="kneeling"] .wager-bankruptcy-shoe { animation:defeatSlowPush 1500ms linear both;translate:0 6px; }
.wager-bankruptcy-taunt[data-motion="full"][data-scene="step-on"] .wager-bankruptcy-step-on-frame { scale:1; }
.wager-bankruptcy-taunt[data-motion="full"][data-impact="contact"] .wager-bankruptcy-step-on-frame {
  animation:wagerBankruptcyStepRecoil 245ms ease-out both,wagerBankruptcyStepOnBreathe 4600ms ease-in-out 245ms infinite,defeatSlowPush 18s linear 245ms infinite alternate;
}
.wager-bankruptcy-taunt .wager-bankruptcy-sparks { display:block;z-index:3;clip-path:polygon(0 45%,8% 45%,8% 100%,92% 100%,92% 45%,100% 45%,100% 100%,0 100%); }
.wager-bankruptcy-taunt:not([data-motion="full"]) .wager-bankruptcy-sparks { display:none; }
.defeat-edge-hearts { clip-path:polygon(0 48%,8% 48%,8% 100%,92% 100%,92% 48%,100% 48%,100% 100%,0 100%); }
.defeat-knee-puff { display:none;position:absolute;z-index:1;bottom:0;left:28%;width:44%;height:7%;pointer-events:none;
  background:radial-gradient(ellipse,#e9b8d64d,transparent 70%); }
.wager-bankruptcy-taunt[data-motion="full"][data-scene="kneeling"] .defeat-knee-puff { display:block;animation:defeatKneePuff 420ms ease-out both; }
@keyframes defeatKneePuff { from { opacity:0;transform:scale(.4); } 35% { opacity:.7; } to { opacity:0;transform:scale(1.25); } }

.wager-bankruptcy-taunt:not([data-motion="full"]) .wager-bankruptcy-mist { display:none; }
.defeat-declaration[data-motion="still"] .defeat-declaration-art { animation:defeatFade 140ms ease both !important; }

.wager-bankruptcy-plane { --defeat-origin-x:-50%;--defeat-origin-y:-50%; }
.wager-bankruptcy-step-on-frame { --defeat-origin-x:-50%;--defeat-origin-y:-32%; }
.wager-bankruptcy-taunt[data-scene="kneeling"] .wager-bankruptcy-shoe { --defeat-origin-y:6px; }

/* Registration measured at alpha >=128: standing head 113, shoulders 138;
   kneeling head 381, shoulders 490. A .29 source scale matches both within 4%. */
.wager-bankruptcy-standing-boy {
  position:absolute;inset:0;width:100%;height:100%;max-width:none;object-fit:cover;object-position:center bottom;z-index:1;
}
.wager-bankruptcy-taunt:not([data-scene="dogeza"]) .wager-bankruptcy-standing-boy { display:none; }
.wager-bankruptcy-taunt .wager-bankruptcy-kneeling-boy {
  width:max(86.285cqw,47.718cqh);height:auto;max-width:none;bottom:max(1.981cqw,1.09545cqh);z-index:1;
}
.wager-bankruptcy-taunt .wager-bankruptcy-shoe { z-index:2; }
.wager-bankruptcy-taunt[data-scene="dogeza"] .wager-bankruptcy-shoe,
.wager-bankruptcy-taunt[data-scene="kneeling"] .wager-bankruptcy-shoe { animation:none;translate:none; }
.wager-bankruptcy-taunt[data-resumed] .wager-bankruptcy-kneeling-boy { animation:none !important; }
@keyframes defeatKneelDrop {
  0% { transform:translateY(-3.5%); }
  70% { transform:translateY(1%); }
  100% { transform:translateY(0); }
}
@keyframes defeatKneelShake {
  0%,100% { translate:-50% 0; }
  12% { translate:calc(-50% - 2px) .7px; }
  27% { translate:calc(-50% + 1.7px) -.5px; }
  43% { translate:calc(-50% - 1.2px) .4px; }
  60% { translate:calc(-50% + .8px) -.2px; }
  80% { translate:calc(-50% - .4px) 0; }
}
.defeat-kneel-flare { position:absolute;inset:0;z-index:5;pointer-events:none;opacity:0;
  background:radial-gradient(ellipse at 50% 72%,#fff1f4 0%,#ffbddb 32%,#ffc8df55 65%,transparent); }
.defeat-kneel-flare::after { content:"";position:absolute;inset:0;
  background:radial-gradient(ellipse at 50% 72%,transparent 24%,#ff76b966 100%); }
.wager-bankruptcy-taunt[data-scene="kneeling"]:not([data-resumed]) .defeat-kneel-flare { animation:defeatKneelFlare 720ms ease-out both; }
.wager-bankruptcy-taunt[data-motion="full"][data-scene="kneeling"]:not([data-resumed]) { animation:defeatKneelNudge 240ms ease-out both; }
@keyframes defeatKneelFlare { 0% { opacity:0; } 16.667% { opacity:.45; } 100% { opacity:0; } }
@keyframes defeatKneelNudge { 0%,100% { transform:translate(0,0); } 25% { transform:translate(1px,2px); } 60% { transform:translate(-1px,-1px); } }
.wager-bankruptcy-taunt[data-motion="still"][data-scene="kneeling"] .defeat-kneel-flare { animation:defeatKneelSoftFade 600ms ease-out both; }
@keyframes defeatKneelSoftFade { from { opacity:.22; } to { opacity:0; } }
.wager-bankruptcy-taunt[data-motion="still"] .wager-bankruptcy-boy-back { opacity:.45; }
.defeat-spoken-heart { display:inline-block;font-family:"Segoe UI Symbol","Arial Unicode MS",sans-serif;color:#ff7ab8;animation:defeatHeartPulse 2400ms ease-in-out infinite; }
@keyframes defeatHeartPulse { 0%,100% { scale:1; } 50% { scale:1.12; } }
.defeat-declaration-dialogue .portrait-callout { font-size:clamp(16px,2.3cqw,22px);line-height:1.45;max-height:calc(100% - 16px); }

/* Continuous word-wall motion belongs to the declaration in both motion modes. */
.wager-bankruptcy-wall .losing-pressure-board-row,
.defeat-declaration[data-motion="still"] .wager-bankruptcy-wall .losing-pressure-board-row {
  animation:losingPressureBoardMarquee var(--row-speed,12000ms) linear infinite !important;
  animation-delay:var(--row-delay,0ms) !important;
}
.wager-bankruptcy-wall .losing-pressure-board-row:nth-child(2n),
.defeat-declaration[data-motion="still"] .wager-bankruptcy-wall .losing-pressure-board-row:nth-child(2n) {
  animation-direction:reverse !important;
}
