/* Playground page (playground.js). The list follows the Bookings page: Pulse
   ground, hairline rows, Tier 1 controls mapped to the Pulse tokens. The
   viewer is a full screen layer above the chrome and the dock, built for a
   phone first: a top bar, the preview, and a thumb reach action row. */
.pg-page, .pg-viewer {
  --ui-ground: var(--bg); --ui-rail: var(--card); --ui-raised: var(--panel);
  --ui-hover: var(--accent-tint); --ui-pressed: var(--border);
  --ui-ink: var(--text); --ui-ink-muted: var(--dim); --ui-ink-faint: var(--faint);
  --ui-ink-inverse: var(--bg); --ui-line: var(--border); --ui-line-strong: var(--line-strong);
  --ui-accent: var(--accent); --ui-accent-ink: var(--bg); --ui-ring-color: var(--accent);
  --ui-radius: var(--radius); --ui-radius-card: var(--radius);
}
.pg-page { padding-top: 12px; max-width: 980px; margin: 0 auto; }
.pg-eyebrow { color: var(--accent); font: 10px var(--mono); letter-spacing: .1em; margin: 0 0 10px; }
.pg-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 20px; margin-bottom: 16px; }
.pg-head h1 { font-size: clamp(28px, 4vw, 36px); letter-spacing: -.04em; margin: 0 0 8px; }
.pg-intro { color: var(--dim); font-size: 14px; margin: 0; max-width: 540px; line-height: 1.6; }
.pg-head .ui-btn { min-height: 40px; }
.pg-filter { display: flex; margin-bottom: 10px; }
.pg-filter button { flex: 1 1 0; min-height: 40px; white-space: nowrap; }
.pg-count { margin-left: 4px; color: var(--faint); font-variant-numeric: tabular-nums; }
.pg-status-line { min-height: 1.6em; font-size: 12px; margin: 0 0 10px; }
.pg-list { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.pg-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 64px; color: var(--text); text-decoration: none; min-width: 0; }
.pg-row + .pg-row { border-top: 1px solid var(--border); }
.pg-row:hover, .pg-row:focus-visible { background: var(--accent-tint); }
.pg-row--skel { flex-direction: column; align-items: stretch; gap: 8px; }
.pg-row__text { display: flex; flex-direction: column; gap: 3px; flex: 1 1 auto; min-width: 0; }
.pg-row__text strong { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.pg-row__meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font: 11px var(--mono); color: var(--dim); }
.pg-row__desc, .pg-row__note { font-size: 12px; color: var(--dim); line-height: 1.5; overflow-wrap: anywhere; }
.pg-row__note { color: var(--text); }
.pg-row__chev { color: var(--faint); font-size: 20px; }
.pg-empty { margin: 0; padding: 16px 18px; color: var(--dim); font-size: 13px; }
.pg-status { flex: none; text-transform: uppercase; font-size: 9px; letter-spacing: .06em; }
.pg-status[data-status="approved"] { color: var(--up); border-color: var(--up); }
.pg-status[data-status="rejected"] { color: var(--down); border-color: var(--down); }
.pg-status[data-status="pending"] { color: var(--warn); border-color: var(--warn); }

/* Full screen viewer: covers the chrome and the dock. */
html.pg-fullscreen { scrollbar-gutter: auto; }
html.pg-fullscreen, html.pg-fullscreen body { overflow: hidden; }
html.pg-fullscreen .dock, html.pg-fullscreen .desktop-tools { display: none !important; }
.pg-viewer {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
  background: var(--bg); height: 100dvh;
}
.pg-bar {
  display: flex; align-items: center; gap: 10px; flex: none;
  padding: 8px 10px; padding-top: calc(8px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--border); background: var(--card);
}
.pg-back { font-size: 24px; line-height: 1; text-decoration: none; }
.pg-bar .ui-iconbtn { width: 44px; height: 44px; flex: none; }
.pg-bar__title { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.pg-bar__title strong { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-bar__title span { font: 10px var(--mono); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-frame-wrap { flex: 1 1 auto; min-height: 0; background: #fff; }
.pg-frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.pg-actions {
  flex: none; display: flex; flex-direction: column; gap: 8px;
  padding: 10px 12px; padding-bottom: calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border); background: var(--card);
}
.pg-actions:empty { display: none; }
.pg-actions__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 560px; width: 100%; margin: 0 auto; }
.pg-btn { min-height: 44px; }
.pg-btn[data-pg-set="approved"][aria-pressed="true"] { background: var(--up); border-color: var(--up); color: #000; }
.pg-btn[data-pg-set="rejected"][aria-pressed="true"] { border-color: var(--down); color: var(--down); }
.pg-actions__note, .pg-actions__ro { margin: 0 auto; max-width: 560px; width: 100%; font-size: 12px; color: var(--dim); line-height: 1.5; overflow-wrap: anywhere; max-height: 4.5em; overflow: auto; }
.pg-actions__status { margin: 0 auto; max-width: 560px; width: 100%; font-size: 12px; }
.pg-actions__status:empty { display: none; }
.pg-note { display: flex; flex-direction: column; gap: 6px; max-width: 560px; width: 100%; margin: 0 auto; }
.pg-note[hidden] { display: none; }
.pg-note .ui-input { width: 100%; font-family: var(--body); color-scheme: dark; }
.pg-note__foot { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 420px) {
  .pg-filter button { padding-left: 6px; padding-right: 6px; font-size: 12px; }
}
