/* onescreen-shell.css: the one-screen result sheet for shell and custom games (P2FS04, taste/ONE_SCREEN.md rule 7).
 * Same block as play-template tools/onescreen_port/onescreen.css (kit 18), for pages that use the shell's
 * #result-screen.result-card / .result-actions / #next-button markup. onescreen-shell.js sets <html data-pl-screen>.
 * The win card becomes a sheet pinned to the bottom of the screen with Next first; nothing gets smaller. */
:root[data-pl-screen="result"] #result-screen.result-card {
  position: fixed; z-index: 30; left: 50%; bottom: 0; width: min(100%, 430px); transform: translateX(-50%);
  display: flex; flex-direction: column; max-height: min(62dvh, calc(100dvh - 72px)); overflow-y: auto; overscroll-behavior: contain;
  margin: 0; padding: 14px 14px max(14px, env(safe-area-inset-bottom));
  background: var(--t-board, var(--card, var(--paper, var(--bg, #fff))));
  border: 2px solid var(--t-ink, var(--line, var(--ink, currentColor))); border-bottom: 0; border-radius: 10px 10px 0 0;
  box-shadow: 0 -8px 28px rgb(0 0 0 / .18); box-sizing: border-box;
}
:root[data-pl-screen="result"] #result-screen.result-card[hidden] { display: none; }
:root[data-pl-screen="result"] #result-screen .result-title { order: 0; }
:root[data-pl-screen="result"] #result-screen .result-marks { order: 1; margin: 2px 0 10px; }
:root[data-pl-screen="result"] #result-screen .result-actions { order: 2; }
:root[data-pl-screen="result"] #result-screen .share-line { order: 3; margin: 10px 0 0; }
:root[data-pl-screen="result"] #result-screen > :not(.result-title):not(.result-marks):not(.result-actions):not(.share-line) { order: 4; }
#result-screen .result-actions #next-button:not([hidden]) { flex: 1 1 100%; order: -1; }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.reduced-motion)[data-pl-screen="result"] #result-screen.result-card { animation: pl-sheet-up .22s ease-out; }
}
@keyframes pl-sheet-up { from { transform: translate(-50%, 24px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* the first 450 ms after the sheet opens it ignores touches (a ghost click from the winning tap must not press Next) */
#result-screen[data-pl-guard] { pointer-events: none; }
:root[data-pl-screen="result"] body { padding-bottom: var(--pl-sheet-h, 0px); }
