/* Approved 2026-09-07: rupture, result and parent-group invitation. */
body[data-ending-layout] #screenFracture { display: none !important; }
body[data-ending-layout] .app-shell.is-earthquake { animation: none !important; }
body[data-ending-layout] .app-shell.is-earthquake::after { display: none !important; }
body[data-ending-layout] .ending-plates {
  position: fixed; inset: 0; width: 100vw; height: 100dvh;
  z-index: 100; overflow: hidden; background: #ebe7ee;
  pointer-events: none; margin: 0; padding: 0; border: 0;
}
body[data-ending-layout] .ending-plate {
  position: absolute; inset: -24px; background: #fff; will-change: transform;
}
body[data-ending-layout] .ending-plate-left {
  clip-path: polygon(0 0, 63% 0, 57% 23%, 60% 36%, 42% 64%, 46% 78%, 36% 100%, 0 100%);
  animation: ending-left 1100ms cubic-bezier(.24,.7,.2,1) both;
}
body[data-ending-layout] .ending-plate-right {
  clip-path: polygon(63% 0, 100% 0, 100% 100%, 36% 100%, 46% 78%, 42% 64%, 60% 36%, 57% 23%);
  animation: ending-right 1100ms cubic-bezier(.24,.7,.2,1) both;
}
@keyframes ending-left {
  0%, 8% { transform: translate(0,0); }
  17% { transform: translate(-2px,1px); }
  27% { transform: translate(0,-1px); }
  49% { transform: translate(-7px,2px); }
  68% { transform: translate(-6px,1px); }
  100% { transform: translate(-9px,3px); }
}
@keyframes ending-right {
  0%, 8% { transform: translate(0,0); }
  17% { transform: translate(2px,-1px); }
  27% { transform: translate(1px,0); }
  49% { transform: translate(7px,-2px); }
  68% { transform: translate(6px,-1px); }
  100% { transform: translate(9px,-3px); }
}
body[data-ending-layout] .result-panel .overlay-logo { margin-bottom: 16px; }
body[data-ending-layout] .result-panel #resultTitle { font-size: clamp(1.9rem,8.3vw,2.5rem); }
body[data-ending-layout] #resultText { font-size: 1rem; line-height: 1.4; }
body[data-ending-layout] .result-score { margin-top: 14px; padding-block: 10px; }
body[data-ending-layout] .share-mission .chain-proof { margin-bottom: 14px; padding-block: 14px; }
body[data-ending-layout] #shareTitle { font-size: 1.3rem; line-height: 1.2; }
body[data-ending-layout] .share-mission > p:not(.challenge-hint):not(.share-feedback) { font-size: .94rem; line-height: 1.35; margin-bottom: 12px; }
@media (max-width:350px) {
  body[data-ending-layout] .result-panel { padding: 14px 16px; }
  body[data-ending-layout] .result-panel .overlay-logo { width: 84px; margin-bottom: 8px; }
  body[data-ending-layout] #resultKicker { margin-block: 0 8px; font-size: .875rem; }
  body[data-ending-layout] .result-panel #resultTitle { font-size: 1.7rem; margin-bottom: 8px; }
  body[data-ending-layout] #resultText { font-size: .9375rem; line-height: 1.32; }
  body[data-ending-layout] .result-score { margin-top: 10px; padding-block: 8px; }
  body[data-ending-layout] .result-score strong { font-size: 1.5rem; }
  body[data-ending-layout] .share-mission .chain-proof { padding-block: 10px; margin-bottom: 10px; }
  body[data-ending-layout] .chain-proof > strong { font-size: 2rem; }
  body[data-ending-layout] #shareTitle { font-size: 1.15rem; }
  body[data-ending-layout] .share-mission > p:not(.challenge-hint):not(.share-feedback) { font-size: .875rem; margin-bottom: 10px; }
  body[data-ending-layout] #challengeButton { font-size: 1rem; min-height: 48px; padding: 10px 14px; }
}
@media (orientation:landscape) and (max-height:500px) {
  body[data-ending-layout] .result-panel { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 12px 26px; max-width: 920px; width: 100%; padding: 16px 24px; }
  body[data-ending-layout] .ending-summary { grid-column: 1; min-width: 0; }
  body[data-ending-layout] .share-mission { grid-column: 2; grid-row: 1; min-width: 0; }
  body[data-ending-layout] .result-panel .overlay-logo { width: 84px; margin-bottom: 10px; }
  body[data-ending-layout] #resultKicker { font-size: .875rem; margin: 0 0 8px; }
  body[data-ending-layout] .result-panel #resultTitle { font-size: 1.9rem; }
  body[data-ending-layout] .share-mission .chain-proof { padding-top: 0; }
  body[data-ending-layout] .result-panel > :not(.ending-summary):not(.share-mission) { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-ending-layout] .ending-plates { display: none; }
}
