/*
 * sp-sheet.css: the shared sheet's tokens and the few rules its behaviour needs (design package 4, "one sheet", 5 Dec 2026;
 * the founder: "OK let's get going on this all in the most efficient way possible"). Loaded with sp-sheet.js by
 * partials/sp-sheet-assets, versioned by the file's mtime. A sheet's own look stays in its own stylesheet; it takes
 * its top radius, its scrim and its layer from these variables.
 *
 * Layers (one scale; the tab bar is 1030 in app-shell.css). Sheets still on their own numbers until stage 3 moves them:
 * the sign-in, place and search overlays 1060, the post menu 1070, the photo viewer 1080 (all open over a pop-up),
 * the result share sheet 1300, the race plan 3000-3002, the menu 1100.
 *   --sp-z-sheet       a sheet or pop-up over the page and the tab bar
 *   --sp-z-sheet-over  a sheet opened from a sheet (the comments sheet from a result pop-up)
 *   --sp-z-alert       a confirm or alert over everything
 */
:root {
    --sp-sht-radius: 20px;
    --sp-sht-scrim: rgba(11, 17, 17, .55);
    --sp-z-sheet: 1050;
    --sp-z-sheet-over: 2100;
    --sp-z-alert: 3000;
}

/* the page behind holds still while a sheet is open; the scrollbar's width is kept so nothing shifts sideways */
html.sp-sht-lock, html.sp-sht-lock body { overflow: hidden; }
html.sp-sht-lock body { padding-right: var(--sp-sht-bar, 0px); }

[data-sp-sheet][hidden] { display: none !important; }
[data-sp-sheet-scrim] { touch-action: none; -webkit-tap-highlight-color: transparent; }
[data-sp-sheet-panel] { overscroll-behavior: contain; }
[data-sp-sheet-handle] { touch-action: none; cursor: grab; }
[data-sp-sheet].is-dragging [data-sp-sheet-handle] { cursor: grabbing; }
[data-sp-sheet].is-dragging [data-sp-sheet-panel] { user-select: none; -webkit-user-select: none; }
