/* PrepBuddy shared: pushed-screen chrome (app shell "Pushed screen": a simple page bar, back or close, title, up to 2 actions).
   Flutter: PbPageScaffold. Tokens only. Compact = full screen; from 600 dp the page becomes a centred card (dialog) on a scrim. */
.page-wrap { min-height: 100vh; background: var(--bg); color: var(--text-primary); display: flex; flex-direction: column; }   /* the body colour is set here too: a page that does not load chrome.css (a pushed portal page) inherited the browser's black in dark (queue item, 2026-10-18) */
.page-bar { position: sticky; top: 0; z-index: 20; min-height: 56px; display: flex; align-items: center; gap: 4px; padding: 0 8px; background: var(--bg); }
.page-bar.scrolled { box-shadow: 0 1px 0 var(--border); }
.page-bar .ib { width: 48px; height: 48px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-primary); flex-shrink: 0; }
.page-bar .ib:hover { background: var(--surface); }
.page-bar .ib:focus-visible, .page-bar .tbtn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* plain bar icons (2026-10-05): the actions in a page bar (Chat, Notifications, Profile, a conversation) have no circle, like the header's; a filled primary action and a saved bookmark keep theirs */
.page-bar .tbtn:not(.fill, .on, .danger, .pending, .hero, .hero-out, .media) { background: transparent; box-shadow: none; }
.page-bar .tbtn:not(.fill, .on, .danger, .pending, .hero, .hero-out, .media):hover { background: color-mix(in srgb, var(--primary) 10%, transparent); }   /* Back and the bar actions show where keyboard focus is */
html:has(.page-bar) { scroll-padding-top: 72px; }   /* a control reached with Tab is scrolled clear of the sticky page bar */
.page-bar .ib .mi { font-size: 24px; }
.page-bar h1 { flex: 1; min-width: 0; margin: 0; padding-block: 6px; font-size: calc(18px * var(--font-scale)); font-weight: 700; letter-spacing: -0.01em; overflow: hidden; overflow-wrap: break-word; max-block-size: 3lh; padding-inline-start: 4px; }   /* a title wraps to a second line (the bar's min-height grows) instead of ending in an ellipsis: Tamil at 320 and 1.43 text scale; three lines at most (render sweep 2026-10-19) */
.page-bar .act { display: inline-flex; align-items: center; gap: 4px; }
.page-bar .btn-sm { min-height: 40px; padding: 0 18px; }
.page-bar .btn[disabled] { opacity: .45; pointer-events: none; }
.page-body { flex: 1; padding: 0 16px 16px; display: flex; flex-direction: column; gap: 16px; }
/* reading column for long pushed screens (Feed detail, Topic page): the feed's 680 dp, centred from 600 dp; the page bar stays full width */
.page-col { flex: 1; width: 100%; max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
/* the pinned action bar of a pushed screen (tokens §7 "Pinned action bar"; Flutter BottomAppBar): the screen's one primary text button at full width, an optional line
   above it (.pin-line: a lock and why the button waits, or how the payment is made) or two buttons in a row (.pin-row). Shared since 2026-10-03 (was pursue.css .pu-bar2), so
   Pursue and Payments use one bar; Prepare's price-first action bar (.pp-foot) is the same BottomAppBar and is to adopt it */
.pin-bar { position: sticky; bottom: 0; z-index: 10; margin: 0 -16px; padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--bg); box-shadow: 0 -1px 0 var(--border); display: flex; flex-direction: column; gap: 8px; }
.pin-bar .btn { width: 100%; } .pin-bar .btn .mi { font-size: 20px; }
.pin-line { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 6px; font-size: calc(12px * var(--font-scale)); font-weight: 600; line-height: 1.4; color: var(--text-secondary); text-align: center; }
.pin-line .mi { font-size: 16px; flex-shrink: 0; }
.pin-row { display: flex; gap: 8px; align-items: center; } .pin-row .btn { flex: 1; }
@media (min-width: 600px) {
  .pin-bar { margin: 0 -24px; padding-inline: 24px; }
  /* the backdrop of a dialog-style page on wide screens is the app's own themed canvas (the lit top, a soft second glow low on the end side), under a light scrim so the card still lifts off it (2026-10-09; it was the flat scrim colour) */
  body.dialog-page { background: linear-gradient(color-mix(in srgb, var(--scrim) 22%, transparent), color-mix(in srgb, var(--scrim) 22%, transparent)), radial-gradient(60% 480px at 50% 0, color-mix(in srgb, var(--primary) 26%, transparent), transparent 100%), radial-gradient(55% 460px at 100% 100%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 100%), radial-gradient(45% 380px at 0 100%, color-mix(in srgb, var(--cat-purple) 12%, transparent), transparent 100%), var(--bg); background-repeat: no-repeat; background-attachment: fixed; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; box-sizing: border-box; min-height: 100vh; }
  body.dialog-page .page-wrap { width: 100%; max-width: 600px; min-height: 0; border-radius: 24px; overflow: clip; box-shadow: 0 0 0 1px var(--edge), 0 30px 80px color-mix(in srgb, var(--shadow-ink) 35%, transparent); }
  /* the bar's background spans the window; its content is inset to the 680 dp reading column, so the back icon and the
     trailing action share the left and right edges of the content below (icon = 24 dp centred in a 48 dp button, hence − 12) */
  .page-bar { min-height: 64px; padding: 0 max(12px, calc((100% - 680px) / 2 - 12px)); }
  .page-body { padding: 0 24px 24px; }
}
/* the FAB of a pushed screen sits above the screen edge, not above a tab bar (a pushed screen has none); .keep = it stays from 600 dp (Adda swaps it for a composer card, Chat does not) */
body:has(.page-wrap) .fab { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
/* toast (theme.css) clears a pushed screen's bottom toolbar (56 dp) on phones */
@media (max-width: 599px) { body:has(.page-wrap :is([data-pb="PbActionBar"],[data-pb="PbPinnedActionBar"])) .toast { bottom: 80px; } }
/* dev-only Theme Lab on pushed screens: bottom end, above a toolbar or comment bar, never over the page bar or the chips */
body:has(.page-wrap) .theme-lab { top: auto !important; bottom: 88px; inset-inline-end: 12px; }
body:has(.page-wrap) .theme-lab-panel { top: auto !important; bottom: 44px; inset-inline-end: 0; max-height: 70vh; overflow: auto; }
@media (prefers-reduced-motion: reduce) { .page-bar { transition: none; } }
/* destination pages from 1024 dp: the 1160 dp frame, the bar's content inset to it (tokens §7 Page bar). The Receipt uses it; Prepare's pp-wide and cd-page and Profile's pf-wide repeat these two lines and move here */
@media (min-width: 1024px) {
  body.page-wide .page-col { max-width: 1160px; }
  body.page-wide .page-bar { padding: 0 max(12px, calc((100% - 1160px) / 2 - 12px)); }
}
