/* The same colours and type as HA-liday Show's editor. */
:root {
  --bg: #f5f6f8; --panel: #ffffff; --text: #1c1f24; --muted: #5f6672; --line: #d9dce1;
  --accent: #0277bd; --accent-text: #ffffff; --danger: #c62828; --ok: #13733a; --warn: #a84d08;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418; --panel: #1b1f25; --text: #e6e8eb; --muted: #9aa3ad; --line: #2f353d;
    --danger: #f2786d; --ok: #4ade80; --warn: #fbbf24; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
/* Spacing, corners, text size and borders (How the page looks): --s scales the gaps, --r the corners. */
:root { --s: 1; --r: 10px; --fs: 16px; --bw: 1px; }
:root[data-spacing="compact"] { --s: .7; }
:root[data-spacing="roomy"] { --s: 1.4; }
:root[data-corners="square"] { --r: 0px; }
:root[data-corners="round"] { --r: 22px; }
:root[data-size="small"] { --fs: 15px; }
:root[data-size="large"] { --fs: 18px; }
:root[data-borders="off"] { --bw: 0px; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: var(--fs)/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
/* Every line wraps a word too long for the screen (a show named with underscores, a long link, words
   you've typed), anywhere if it must. One line wider than the screen makes a phone zoom the whole
   page out to fit it. */
.pp { overflow-wrap: anywhere; }
.pp button { max-width: 100%; }
/* A show's name keeps room to read; a button too long to sit beside it goes underneath. */
.pp-row { flex-wrap: wrap; }
.pp-row .pp-text { flex: 1 1 10em; }
.pp img, .pp-snow { max-width: 100%; }
.pp { max-width: 32em; margin: 0 auto; padding: calc(20px * var(--s)) 16px calc(40px * var(--s)); }
h1 { font-size: 1.5em; margin: 0 0 calc(12px * var(--s)); }
h2 { font-size: 1.125em; margin: calc(28px * var(--s)) 0 calc(10px * var(--s)); }
h2 + .pp-hint { margin-top: calc(-6px * var(--s)); }
.pp-hint { color: var(--muted); margin: 2px 0 calc(10px * var(--s)); font-size: .875em; }
.pp-now { font-weight: 600; margin: 0 0 calc(12px * var(--s)); }
.pp-big { font-size: 1.25em; font-weight: 600; margin: 0; }
.pp-card { background: var(--panel); border: var(--bw) solid var(--line); border-radius: var(--r);
  padding: calc(16px * var(--s)); }
.pp-list { display: flex; flex-direction: column; gap: calc(8px * var(--s)); }
.pp-row { display: flex; align-items: center; gap: 12px; background: var(--panel);
  border: var(--bw) solid var(--line); border-radius: var(--r); padding: calc(12px * var(--s)); }
.pp-yours { border: max(var(--bw), 2px) solid var(--accent); }
.pp-text { flex: 1; min-width: 0; }
.pp-name { font-weight: 600; overflow-wrap: anywhere; }
.pp-row .pp-hint { margin: 0; }
.pp-block { color: var(--warn); font-weight: 600; margin: 6px 0 calc(10px * var(--s)); }
.pp-message { color: var(--danger); font-weight: 600; margin: calc(10px * var(--s)) 0; }
button { font: inherit; min-height: 44px; padding: 8px 16px; border-radius: calc(var(--r) * .8); cursor: pointer;
  background: var(--panel); color: var(--text); border: 1px solid var(--line); flex: none; }
button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pp-later { opacity: .5; }
#pp-coming { margin: 0 0 8px; }
.pp-message.pp-info { color: var(--muted); font-weight: 400; }
.pp-where { margin: 0 0 8px; }
.pp-where p { margin: 0; }
.pp-where button { margin-top: 12px; }

/* Themes (Public page tab → How the page looks). Every text colour reads at 4.5:1 or more. */
:root[data-theme="christmas"][data-mode="light"], :root[data-theme="christmas"][data-mode="auto"] { --bg: #fbf6f1; --panel: #ffffff; --text: #1f1a17; --muted: #5c524b; --line: #e6dbd1; --accent: #b3261e; --head: #1b6b3a; color-scheme: light; }
:root[data-theme="christmas"][data-mode="dark"] { --bg: #0e1913; --panel: #15241b; --text: #eef4ef; --muted: #a9b9ad; --line: #284035; --accent: #c62828; --head: #7fd39b; color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root[data-theme="christmas"][data-mode="auto"] { --bg: #0e1913; --panel: #15241b; --text: #eef4ef; --muted: #a9b9ad; --line: #284035; --accent: #c62828; --head: #7fd39b; color-scheme: dark; } }
:root[data-theme="frosty"][data-mode="light"], :root[data-theme="frosty"][data-mode="auto"] { --bg: #f0f6fb; --panel: #ffffff; --text: #13202d; --muted: #4e5f6f; --line: #d4e1ec; --accent: #1565c0; --head: #0d47a1; color-scheme: light; }
:root[data-theme="frosty"][data-mode="dark"] { --bg: #0a1520; --panel: #11202e; --text: #e8f1f9; --muted: #a2b5c7; --line: #21364a; --accent: #1565c0; --head: #90caf9; color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root[data-theme="frosty"][data-mode="auto"] { --bg: #0a1520; --panel: #11202e; --text: #e8f1f9; --muted: #a2b5c7; --line: #21364a; --accent: #1565c0; --head: #90caf9; color-scheme: dark; } }
:root[data-theme="halloween"][data-mode="light"], :root[data-theme="halloween"][data-mode="auto"] { --bg: #fbf5ee; --panel: #ffffff; --text: #1d1610; --muted: #5e5146; --line: #e9dccb; --accent: #b93d0b; --head: #6a1b9a; color-scheme: light; }
:root[data-theme="halloween"][data-mode="dark"] { --bg: #130e16; --panel: #1e1622; --text: #f2ebf4; --muted: #b5a7ba; --line: #36293b; --accent: #c2410c; --head: #f0a35e; color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root[data-theme="halloween"][data-mode="auto"] { --bg: #130e16; --panel: #1e1622; --text: #f2ebf4; --muted: #b5a7ba; --line: #36293b; --accent: #c2410c; --head: #f0a35e; color-scheme: dark; } }
/* Plain, forced light or dark whatever the phone says. */
:root[data-theme="plain"][data-mode="light"] { --bg: #f5f6f8; --panel: #ffffff; --text: #1c1f24; --muted: #5f6672;
  --line: #d9dce1; --accent: #0277bd; color-scheme: light; }
:root[data-theme="plain"][data-mode="dark"] { --bg: #111418; --panel: #1b1f25; --text: #e6e8eb; --muted: #9aa3ad;
  --line: #2f353d; --accent: #0277bd; color-scheme: dark; }
:root[data-mode="light"] { --danger: #c62828; --ok: #13733a; --warn: #a84d08; }
:root[data-mode="dark"] { --danger: #f2786d; --ok: #4ade80; --warn: #fbbf24; }
h1, h2 { color: var(--head, var(--text)); }

.pp-header { margin: 0 0 12px; }
.pp-header h1 { margin: 0; overflow-wrap: anywhere; }
.pp-picture { display: block; width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--r);
  border: var(--bw) solid var(--line); margin: 0 0 calc(14px * var(--s)); }
.pp-welcome { margin: 6px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.pp-footer { margin: calc(32px * var(--s)) 0 0; text-align: center; }
.pp-footer a { color: var(--head, var(--text)); font-weight: 600; overflow-wrap: anywhere; }
/* Sized to the screen: the canvas itself is drawn at the phone's full pixel density, and left to its own
   size it would be two or three screens wide, which shrinks the whole page on a phone. */
.pp-snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.pp { position: relative; z-index: 1; }

/* Your own colours: hints and borders are worked out from the text and background. */
:root[data-theme="custom"] { --muted: color-mix(in srgb, var(--text) 72%, var(--bg));
  --line: color-mix(in srgb, var(--text) 18%, var(--bg)); }
.pp-hours { margin: 0 0 calc(8px * var(--s)); }
.pp-warning { margin: 0 0 calc(10px * var(--s)); border: max(var(--bw), 2px) solid var(--warn); }
.pp-warning p { margin: 0; font-weight: 600; }
.pp-warning button { margin-top: calc(12px * var(--s)); }

/* A show's cover art, from its song, beside its name. */
.pp-cover { flex: none; width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.pp-tile { display: grid; place-items: center; font-weight: 700; font-size: 24px; color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); background: rgba(127, 127, 127, 0.35); }

/* Your headings: the shows under one, in a box with its name. */
.pp-group { display: flex; flex-direction: column; gap: calc(8px * var(--s)); padding: calc(12px * var(--s));
  border: var(--bw) solid var(--line); border-radius: var(--r); background: color-mix(in srgb, var(--panel) 50%, transparent); }
.pp-group-name { margin: 0 0 2px; font-size: 1.05em; font-weight: 700; overflow-wrap: anywhere; }
/* Listening on a phone. */
.pp-listen { margin: 0 0 calc(12px * var(--s)); }
.pp-listen-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pp-listen-row .pp-hint { flex: 1 1 12em; margin: 0; }
.pp-pin { margin-top: calc(12px * var(--s)); }
.pp-pin label { display: block; font-weight: 600; margin-bottom: 6px; }
.pp-pin-row { display: flex; gap: 8px; }
.pp-pin input { font: inherit; min-height: 44px; width: 9em; max-width: 100%; padding: 8px 12px; letter-spacing: .2em;
  border-radius: calc(var(--r) * .8); border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.pp-pin input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pp-listen-msg { color: var(--danger); font-weight: 600; margin: calc(10px * var(--s)) 0 0; }
.pp-listen .pp-hint:last-child { margin-bottom: 0; }
.pp-nudge { margin-top: calc(12px * var(--s)); padding-top: calc(12px * var(--s)); border-top: var(--bw) solid var(--line); }
.pp-nudge-label { font-weight: 600; margin: 0 0 6px; }
.pp-nudge-row { display: flex; align-items: center; gap: 8px; }
.pp-nudge-row button { padding: 8px 12px; }
.pp-nudge-value { flex: 1 1 0; min-width: 0; font-size: .9375em; text-align: center; font-variant-numeric: tabular-nums; }
.pp-nudge .pp-hint { margin: 6px 0 0; }
.pp-admin { border-style: dashed; margin-bottom: calc(14px * var(--s)); }
.pp-admin .pp-pin { margin-top: 0; }
.pp-admin .pp-pin-row { flex-wrap: wrap; margin-top: 8px; }
#pp-title { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }

/* Compact layout (0.2.325): a banner header, a one-line warning, a bar pinned to the top with what's
   on, Listen and the queue, and show rows with Start beside the name. */
.pp-header.pp-banner { position: relative; margin: calc(-20px * var(--s)) -16px 12px; }
.pp-banner .pp-picture { height: 170px; max-height: none; margin: 0; border: 0; border-radius: 0; }
.pp-banner .pp-head-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 32px 16px 10px;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--bg) 92%, transparent)); }
.pp-banner h1 { font-size: 1.35em; }
.pp-banner .pp-welcome { font-size: .875em; margin-top: 2px; }
.pp-warning.pp-slim { border: 0; background: none; padding: 0; margin: 0 0 10px; }
.pp-warning.pp-slim p { font-weight: 400; font-size: .8125em; color: var(--warn); }

.pp-bar { position: sticky; top: 8px; z-index: 3; padding: 10px 12px; margin: 0 0 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28); }
.pp-bar-row { display: flex; align-items: center; gap: 10px; }
.pp-bar-now { flex: 1; min-width: 0; }
.pp-bar .pp-now { margin: 0; }
.pp-now-yours { margin: 4px 0 0; }
.pp-progress { height: 4px; border-radius: 2px; background: var(--line); margin-top: 6px; overflow: hidden; }
.pp-progress div { height: 100%; width: 0; background: var(--head, var(--accent)); transition: width .9s linear; }
.pp-listen-btn { padding: 6px 12px; min-height: 42px; font-weight: 600; }
/* Listen and Join side by side under what's on, so the pinned bar stays two short rows. */
.pp-bar-btns { display: flex; gap: 8px; margin-top: 8px; }
.pp-bar-btns:not(:has(button:not([hidden]))) { display: none; }
.pp-bar-btns button { flex: 1 1 0; min-width: 0; white-space: nowrap; }
/* Record is a camera icon only, so Listen and Join keep their room. */
.pp-bar-btns .pp-rec-btn { flex: 0 0 auto; width: 52px; padding: 0; }
.pp-bar-btns .pp-rec-btn > span { display: none; }
.pp-bar-btns .pp-rec-btn svg { width: 22px; height: 22px; }
/* Join stands out: the page's own colour, until this phone has joined. */
.pp-join-btn { background: var(--head, var(--accent)); border-color: var(--head, var(--accent)); color: var(--bg); }
/* Under the bar, scrolling away with the page: joining's warning, listening's details, your Skip and Stop. */
.pp-more { padding: 10px 12px; margin: 0 0 12px; }
.pp-more > [hidden] + .pp-admin-ctl, .pp-more > .pp-admin-ctl:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.pp-more .pp-listen { margin: 0; }
.pp-listen-btn[aria-pressed="true"] { border-color: var(--head, var(--accent)); color: var(--head, var(--text)); }
.pp-listen { margin: 10px 0 0; }
.pp-listen > .pp-hint { margin: 0; }
.pp-link-btn { min-height: 36px; padding: 4px 0; border: 0; background: none; color: var(--head, var(--accent));
  font-weight: 600; font-size: .875em; text-decoration: underline; text-underline-offset: 3px; }
.pp-queue-box { padding: 10px 12px; margin: 0 0 12px; }
.pp-queue-head { margin: 0 0 6px; font-size: .8125em; color: var(--muted); }
.pp-queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pp-queue li { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: calc(var(--r) * .7); }
.pp-queue li.pp-yours { border: 0; background: color-mix(in srgb, var(--head, var(--accent)) 14%, transparent); }
.pp-queue .pp-cover { width: 40px; height: 40px; border-radius: 6px; }
.pp-queue .pp-tile { font-size: 18px; }
.pp-queue .pp-name { font-size: .9375em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  line-clamp: 2; overflow: hidden; }
.pp-queue .pp-when { font-size: .8125em; color: var(--muted); }
.pp-queue .pp-place { font-weight: 700; }
.pp-queue li.pp-yours .pp-when { color: var(--text); }
.pp-queue button { min-height: 40px; padding: 4px 12px; font-size: .875em; background: transparent; }
.pp-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px; scrollbar-width: none; }
.pp-chips button { flex: none; min-height: 40px; padding: 6px 14px; border-radius: 999px; }
.pp-chips button[aria-pressed="true"] { background: var(--head, var(--accent)); border-color: var(--head, var(--accent));
  color: var(--bg); font-weight: 700; }
#pp-pick h2 { margin-top: calc(16px * var(--s)); }

/* Show rows: Start stays beside the name, however narrow the phone. */
#pp-choices .pp-row { flex-wrap: nowrap; padding: calc(8px * var(--s)); gap: 10px; }
#pp-choices .pp-row .pp-text { flex: 1 1 auto; }
#pp-choices .pp-cover { width: 44px; height: 44px; border-radius: 6px; }
#pp-choices .pp-tile { font-size: 20px; }
#pp-choices .pp-row button { padding: 8px 12px; white-space: nowrap; }
.pp-group { gap: calc(6px * var(--s)); padding: 0; border: 0; background: none; }
.pp-group-name { margin: 10px 4px 2px; font-size: .8125em; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); }
#pp-choices .pp-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
/* A show already waiting or on now: a quiet label where its button was, so it isn't picked twice. */
#pp-choices .pp-row button.pp-taken:disabled { opacity: 1; background: transparent; color: var(--muted);
  border-color: var(--line); cursor: default; }
.pp-votes .pp-leading { color: var(--text); }
/* Your vote: outlined in the accent colour, pressed, so it reads as chosen (press again to take it back). */
#pp-choices .pp-row button.pp-voted { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text);
  border: 2px solid var(--accent); font-weight: 700; }
/* Install app: top right of the banner, or under the title without a picture. */
.pp-install { min-height: 36px; padding: 4px 12px; font-size: .8125em; font-weight: 600; margin-top: 8px; }
.pp-banner .pp-install { position: absolute; top: 10px; right: 12px; margin: 0;
  background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(4px); }
/* Your admin phone: Skip and Stop under what's on. */
.pp-admin-ctl { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed var(--line); }
.pp-admin-ctl button { min-height: 40px; padding: 4px 12px; font-size: .875em; background: transparent; }
#pp-admin-stop { color: var(--danger); border-color: var(--danger); }
/* What's on: its cover art beside its name. On a narrow phone (a Fold's front screen) the Listen or
   Sound off button goes on its own line under them, full width, so the name keeps room to read. */
.pp-now-art { flex: none; display: block; }
.pp-now-art .pp-cover { width: 44px; height: 44px; border-radius: 8px; }
.pp-now-art .pp-tile { font-size: 22px; }
.pp-bar-row { flex-wrap: wrap; }

#pp-soon .pp-cover { width: 44px; height: 44px; border-radius: 6px; }
#pp-soon .pp-tile { font-size: 20px; }
/* Icons on buttons (icons.js), in the button's own colour. */
.pp-has-ico { display: inline-flex; align-items: center; justify-content: center; gap: .45em; }
.pp-ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.pp-ico .pp-ico-fill { fill: currentColor; stroke: none; }
/* An icon in a line of small print: on the line, not lifting the words off it. */
.pp-inline-ico.pp-has-ico { display: inline-block; max-width: 100%; }
.pp-inline-ico .pp-ico { width: 1em; height: 1em; vertical-align: -0.15em; margin-right: .25em; }
#pp-listen-text.pp-has-ico { justify-content: flex-start; }
/* A show's colours: small dots before how long it lasts. A ring keeps a dark or white dot visible on
   any background. */
.pp-dots { display: inline-flex; gap: 3px; margin-right: .45em; vertical-align: -0.08em; }
.pp-dot { width: .8em; height: .8em; border-radius: 50%; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 22%, transparent); }
.pp-len { white-space: nowrap; }

/* Joining the show: the whole screen in the show's colour, with a small Leave button. */
.pp-join { position: fixed; inset: 0; z-index: 50; background: #000; display: flex; flex-direction: column;
  justify-content: flex-end; align-items: center; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }
.pp-join.pp-soft { transition: background-color 0.4s linear; }
/* A Phones lane, drawn on the phone: as big as fits, the show's main colour around it. */
.pp-join-screen { position: absolute; inset: 0; margin: auto; width: min(100vw, calc(100vh * 27 / 48));
  height: min(100vh, calc(100vw * 48 / 27)); image-rendering: pixelated; }
.pp-join-text, .pp-join-leave { position: relative; }
.pp-join-text { color: #fff; text-align: center; max-width: 30em; text-shadow: 0 1px 3px #000; }
/* The flashing warning, in the middle of the dark screen for the first few seconds. */
.pp-join-text.pp-join-warning { margin: auto 0; font-size: 1.25em; font-weight: 600; }
.pp-join-text:empty { display: none; }
.pp-join-leave, .pp-join-back { background: rgba(0, 0, 0, 0.55); color: #fff; border: 1px solid rgba(255, 255, 255, 0.5); }
.pp-join-back { position: relative; }
.pp-join-leave { position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 16px; }
/* What's on and next, with Pick next, along the bottom while joined. */
.pp-join-strip { position: relative; box-sizing: border-box; width: 100%; max-width: 32em; display: flex; align-items: center;
  gap: 12px; padding: 10px 10px 10px 14px; border-radius: 16px; background: rgba(10, 14, 12, 0.82); color: #fff; }
.pp-join-strip[hidden] { display: none; }
.pp-join-strip-text { flex: 1; min-width: 0; }
.pp-join-now, .pp-join-next { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-join-now { font-weight: 700; }
.pp-join-next { font-size: .85em; opacity: .85; }
.pp-join-strip button { flex: none; }
/* Picking: the colours keep the top third and the page's list of shows comes up under them. */
body.pp-join-picking .pp-join { bottom: auto; height: 33vh; height: 33dvh; justify-content: flex-end;
  padding-bottom: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45); }
body.pp-join-picking .pp { padding-top: calc(33vh + 12px); padding-top: calc(33dvh + 12px); }
body.pp-join-picking #pp-pick { scroll-margin-top: calc(33dvh + 12px); }


/* The first-visit welcome: a full screen over the page, one step at a time. */
body.pp-tour-open { overflow: hidden; }
.pp-tour { position: fixed; inset: 0; z-index: 60; background: var(--bg); color: var(--text); overflow-y: auto; }
.pp-tour-in { box-sizing: border-box; max-width: 480px; min-height: 100%; margin: 0 auto; padding: 14px 16px 18px;
  display: flex; flex-direction: column; gap: 12px; }
.pp-tour-top { display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
.pp-tour-dots { display: flex; gap: 6px; }
.pp-tour-dots span { width: 6px; height: 6px; border-radius: 3px; background: var(--line); }
.pp-tour-dots span.pp-done { background: var(--head, var(--accent)); }
.pp-tour-dots span.pp-on { width: 22px; background: var(--head, var(--accent)); }
.pp-tour-skip { color: var(--muted); text-decoration: none; }
.pp-tour h1 { margin: 4px 0 0; font-size: 1.5em; line-height: 1.2; color: var(--head, var(--accent)); outline: none; }
.pp-tour-picture { width: 100%; max-height: 220px; object-fit: cover; border-radius: calc(var(--r) * 1.2); }
.pp-tour-text { margin: 0; }
.pp-tour-warning { border: 2px solid var(--warn); padding: 14px; margin: 4px 0 0; }
.pp-tour-warning p { margin: 0; font-weight: 600; }
.pp-tour-warning .pp-tour-phone { margin-top: 8px; font-weight: 400; }
/* How it works on the welcome: a drawing of a phone and numbered steps, plainly a picture. */
.pp-tour-how { margin: 4px 0 0; padding: 14px 12px; border-radius: calc(var(--r) * 1.2);
  background: color-mix(in srgb, var(--text) 6%, var(--bg)); display: flex; flex-direction: column; gap: 10px; }
.pp-tour-how figcaption { font-size: .6875em; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pp-tour-how-row { display: flex; gap: 14px; align-items: center; }
.pp-tour-phone-pic { flex: none; display: block; transform: rotate(-5deg); }
.pp-tour-phone-pic svg { display: block; }
.pp-tour-phone-pic .ph-body { fill: var(--bg); stroke: var(--muted); stroke-width: 2.5; }
.pp-tour-phone-pic .ph-line { fill: var(--line); }
.pp-tour-phone-pic .ph-head { fill: var(--head, var(--accent)); opacity: .85; }
.pp-tour-phone-pic .ph-row { fill: var(--panel); stroke: var(--line); }
.pp-tour-phone-pic .ph-text { fill: var(--muted); }
.pp-tour-phone-pic .ph-t0 { fill: #43a047; } .pp-tour-phone-pic .ph-t1 { fill: #c62828; } .pp-tour-phone-pic .ph-t2 { fill: #1e88e5; }
.pp-tour-phone-pic .ph-btn { fill: var(--accent); }
.pp-tour-phone-pic .ph-tap { fill: none; stroke: var(--warn); stroke-width: 2; }
.pp-tour-phone-pic .ph-tap2 { stroke-width: 1.2; opacity: .5; }
.pp-tour-phone-pic .ph-hand { fill: #f2c9a5; stroke: #1c1f24; stroke-width: 1.5; stroke-linejoin: round; }
.pp-tour-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 12px; }
.pp-tour-steps li { counter-increment: step; display: flex; gap: 8px; align-items: flex-start; }
.pp-tour-steps li::before { content: counter(step); flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid;
  place-items: center; font-size: .75em; font-weight: 700; background: color-mix(in srgb, var(--head, var(--accent)) 20%, var(--bg));
  color: var(--text); }
.pp-tour-rules { margin: 0; padding-left: 1.2em; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.pp-tour-card { padding: 14px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.pp-tour-card h2 { margin: 0; font-size: 1.05em; }
.pp-tour-card-top { display: flex; gap: 12px; align-items: center; }
.pp-tour-card-top p { margin-top: 2px; }
.pp-tour-phone-small { transform: rotate(-4deg); }
.pp-tour-phone-pic .ph-cable { fill: none; stroke: var(--muted); stroke-width: 4; stroke-linecap: round; }
.pp-tour-phone-pic .ph-cup { fill: var(--muted); }
.pp-tour-phone-pic .ph-note { fill: var(--head, var(--accent)); }
.pp-tour-phone-pic .ph-ray { fill: none; stroke: var(--warn); stroke-width: 3; stroke-linecap: round; }
.pp-tour-card p { margin: 0; color: var(--muted); font-size: .9375em; }
.pp-tour-card button { min-height: 48px; }
.pp-tour-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.pp-tour-buttons { display: flex; gap: 8px; }
.pp-tour-buttons button { min-height: 52px; }
.pp-tour-buttons .primary { flex: 1; font-size: 1.05em; font-weight: 700; }
.pp-tour-once { margin: 0; text-align: center; font-size: .8125em; color: var(--muted); }
.pp-tour-again { text-align: center; margin: 8px 0 0; }

/* Test mode: picks play on phones only. */
.pp-testing { border: 2px dashed var(--warn); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pp-testing[hidden] { display: none; }
.pp-testing p { margin: 0; flex: 1 1 14em; font-weight: 600; }

/* Record a video: the camera full screen, with the controls over it. */
body.pp-rec-open { overflow: hidden; }
.pp-rec { position: fixed; inset: 0; z-index: 70; background: #000; color: #fff; }
.pp-rec[hidden] { display: none; }
.pp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pp-rec-cam { position: absolute; width: 2px; height: 2px; opacity: 0; pointer-events: none; }
.pp-rec-view { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.pp-rec-view[hidden] { display: none; }
.pp-rec-top { position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px;
  display: flex; justify-content: space-between; align-items: center; }
.pp-rec-pill { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.55); color: #fff; font: inherit; font-weight: 600; display: inline-flex;
  align-items: center; justify-content: center; gap: 6px; text-decoration: none; margin: 0; }
.pp-rec-time { font-variant-numeric: tabular-nums; }
.pp-rec-time::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #e53935; }
.pp-rec-hint { position: absolute; left: 16px; right: 16px; bottom: calc(118px + env(safe-area-inset-bottom));
  margin: 0; text-align: center; font-size: .875em; text-shadow: 0 1px 3px #000; }
.pp-rec-hint:empty { display: none; }
.pp-rec-bar { position: absolute; left: 16px; right: 16px; bottom: calc(24px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pp-rec-bar[hidden] { display: none; }
.pp-rec-side { min-width: 88px; }
.pp-rec-go { width: 76px; height: 76px; border-radius: 50%; border: 4px solid #fff; background: transparent;
  padding: 0; display: grid; place-items: center; flex: none; }
.pp-rec-go span { width: 58px; height: 58px; border-radius: 50%; background: #e53935; transition: all .15s; }
.pp-rec-go[aria-pressed="true"] span { width: 28px; height: 28px; border-radius: 6px; }
.pp-rec-done .primary { min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 700; }
/* The finished video sits between the top and the buttons, so its own controls stay clear of them. */
#pp-rec-preview { top: calc(68px + env(safe-area-inset-top));
  height: calc(100% - 168px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
