/*
 * The marketplace's phone demo (phone-demo.php): a welcome screen of devices,
 * then the picked device drawn at its real size in CSS pixels (the page sets
 * --pd-screen-w/-h) and scaled as a whole by --pd-scale, which
 * assets/js/phone-demo.js sets so it fits the window. The phone bodies match
 * a demo store's /phone-demo (PrizeX/assets/css/phone-demo.css, which the
 * portal doesn't deploy with). Under 720px there is no frame: the home screen
 * fills the visitor's own phone.
 */

:root {
  --pd-bg: #0d1117;
  --pd-bg-2: #1b2433;
  --pd-ink: #f5f7fb;
  --pd-ink-soft: #b7c0cf;
  --pd-accent: #4f8cff;
  --pd-body: #15181d;
  --pd-body-edge: #2a2f37;
  --pd-glass: rgba(255, 255, 255, .14);
  --pd-scale: .8;
  --pd-screen-w: 390px;
  --pd-screen-h: 844px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
[hidden] { display: none !important; }

.pd-body {
  min-height: 100vh;
  background: radial-gradient(120% 80% at 50% 0%, var(--pd-bg-2) 0%, var(--pd-bg) 70%);
  color: var(--pd-ink);
  font-family: system-ui, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}

.pd-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 16px 32px;
}

.pd-nav { align-self: stretch; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.pd-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--pd-ink);
  text-decoration: none;
  background: rgba(255, 255, 255, .08);
}
.pd-back:hover, .pd-back:focus-visible { background: rgba(255, 255, 255, .16); }
[dir="rtl"] .pd-back__arrow { transform: scaleX(-1); }
.pd-intro { max-width: 640px; text-align: center; }
.pd-intro h1 { margin: 0 0 6px; font-size: clamp(1.25rem, 2.4vw, 1.75rem); line-height: 1.25; }
.pd-intro p { margin: 0; color: var(--pd-ink-soft); line-height: 1.5; }

/* The welcome screen: one card per device, each with a small drawing of it. */
.pd-devices {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  width: 100%;
  max-width: 640px;
  display: grid;
  gap: 10px;
}
.pd-device-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
}
.pd-device-card__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pd-device-card__text span { color: var(--pd-ink-soft); font-size: .875rem; }
.pd-mini {
  flex: none;
  width: 22px;
  height: 44px;
  border-radius: 6px;
  border: 2px solid var(--pd-ink-soft);
  position: relative;
}
.pd-mini--tablet { width: 34px; height: 46px; border-radius: 5px; }
.pd-mini::after { content: ""; position: absolute; left: 50%; top: 3px; transform: translateX(-50%); background: var(--pd-ink-soft); }
.pd-mini--edge::after { width: 3px; height: 3px; border-radius: 50%; }
.pd-mini--pill::after { width: 8px; height: 3px; border-radius: 2px; }
.pd-run {
  flex: none;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--pd-accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.pd-run:hover, .pd-run:focus-visible { background: #3a74e0; }
.pd-run:focus-visible, .pd-dock__item:focus-visible, .pd-cta__btn:focus-visible, .pd-shade__close:focus-visible, .pd-navbar__btn:focus-visible, .pd-homebar:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.pd-phone { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* Each body around its screen. */
.pd-phone--edge { --pd-bezel: 10px; --pd-radius: 44px; --pd-status-h: 36px; }
.pd-phone--pill { --pd-bezel: 14px; --pd-radius: 58px; --pd-status-h: 54px; }
.pd-phone--tablet { --pd-bezel: 22px; --pd-radius: 36px; --pd-status-h: 30px; }

.pd-phone {
  --pd-w: calc(var(--pd-screen-w) + 2 * var(--pd-bezel));
  --pd-h: calc(var(--pd-screen-h) + 2 * var(--pd-bezel));
}

.pd-slot {
  position: relative;
  width: calc(var(--pd-w) * var(--pd-scale));
  height: calc(var(--pd-h) * var(--pd-scale));
}

.pd-device {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--pd-w);
  height: var(--pd-h);
  transform: scale(var(--pd-scale));
  transform-origin: 0 0;
  border-radius: var(--pd-radius);
  /* Brushed metal: light catching the top-left and bottom-right corners. */
  background:
    linear-gradient(135deg, #4a5059 0%, #1b1e24 14%, #101216 50%, #1b1e24 86%, #444a53 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .14),
    inset 0 0 0 2.5px var(--pd-body-edge),
    inset 0 1px 1px 2px rgba(255, 255, 255, .08),
    0 0 0 1px rgba(0, 0, 0, .55),
    0 2px 3px rgba(0, 0, 0, .28),
    0 14px 28px -8px rgba(0, 0, 0, .45),
    0 42px 80px -24px rgba(0, 0, 0, .6);
}

/* Side buttons, drawn on the body's edges: metal, lit from the front. */
.pd-device::before,
.pd-device::after {
  content: "";
  position: absolute;
  width: 5px;
  border-radius: 2px;
  background: linear-gradient(90deg, #22262d, #5a616b 45%, #2a2e35);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}
.pd-phone--edge .pd-device::before { right: -4px; top: 170px; height: 96px; }
.pd-phone--edge .pd-device::after { right: -4px; top: 290px; height: 56px; }
.pd-phone--pill .pd-device::before { left: -4px; top: 180px; height: 130px; box-shadow: 0 -70px 0 -34px #3a3f47, 0 1px 2px rgba(0, 0, 0, .5); }
.pd-phone--pill .pd-device::after { right: -4px; top: 240px; height: 100px; }
.pd-phone--tablet .pd-device::before { right: 80px; top: -4px; width: 60px; height: 5px; background: linear-gradient(180deg, #22262d, #5a616b 45%, #2a2e35); }
.pd-phone--tablet .pd-device::after { right: -4px; top: 120px; height: 70px; }

/* A slight tilt toward the pointer while it is beside the phone
   (assets/js/phone-demo.js), flat the moment it is over the phone or focus
   is in it, so every tap lands where it looks. */
.pd-slot { transition: transform .15s ease-out; }
.pd-slot.is-tilted { transform: perspective(1800px) rotateX(var(--pd-tilt-x, 0deg)) rotateY(var(--pd-tilt-y, 0deg)); transition-duration: .5s; }

/* Like an app, nothing on the phone is text to select, long-press or drag
   off, except what the visitor types. The framed pages get the same from
   assets/js/phone-demo.js. */
.pd-phone { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.pd-phone input, .pd-phone textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
.pd-phone a, .pd-phone img { -webkit-user-drag: none; }

/*
 * The screen. Its wallpaper is .pd-wall under everything else on it.
 */
.pd-screen {
  position: absolute;
  inset: var(--pd-bezel);
  border-radius: calc(var(--pd-radius) - var(--pd-bezel));
  overflow: hidden; /* the glass: the screen's rounded corners */
  background: #0e1226;
  color: #fff;
  isolation: isolate;
}
/* The glass over it: a thin dark rim where it meets the body and a faint
   sheen across the top. It never takes a tap. */
.pd-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 30;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .7), inset 0 0 0 2px rgba(255, 255, 255, .05);
  background: linear-gradient(118deg, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, .025) 28%, rgba(255, 255, 255, 0) 42%);
}

/*
 * The wallpapers, drawn here and nowhere else: no picture, nothing fetched.
 * Each sets five colours: --wp-a at the top, --wp-c in the middle and --wp-b
 * at the foot, and two soft glows of light. Over them lie two slow, gentle
 * waves of white at a few percent. The probe checks white labels against
 * every colour and every glow at its strongest (4.5:1 or more, before the
 * labels' own shadow). The owner's uploaded picture, when there is one and
 * no wallpaper was asked for, covers them (.pd-screen--pic).
 *
 * In dark mode a veil darkens each a little, so the screen sits quieter.
 */
.pd-wp--dusk { --wp-a: #0b3a73; --wp-c: #1d2f7a; --wp-b: #3a2a78; --wp-glow1: rgba(0, 145, 255, .45); --wp-glow2: rgba(240, 165, 0, .22); }
.pd-wp--tide { --wp-a: #004f8f; --wp-c: #00617a; --wp-b: #0a4f4a; --wp-glow1: rgba(0, 145, 255, .35); --wp-glow2: rgba(31, 191, 124, .28); }
.pd-wp--dawn { --wp-a: #8a4318; --wp-c: #6b3a4e; --wp-b: #1d3a6e; --wp-glow1: rgba(255, 170, 90, .32); --wp-glow2: rgba(120, 170, 255, .22); }
.pd-wp--night { --wp-a: #070b16; --wp-c: #0b1222; --wp-b: #101a30; --wp-glow1: rgba(0, 116, 204, .3); --wp-glow2: rgba(90, 63, 192, .22); }
.pd-wp--prizex { --wp-a: #2a4fbf; --wp-c: #3a3cbc; --wp-b: #4a2bb8; --wp-glow1: rgba(79, 140, 255, .35); --wp-glow2: rgba(106, 61, 240, .35); }
.pd-wp--bidking { --wp-a: #8a3a14; --wp-c: #723016; --wp-b: #5a1f10; --wp-glow1: rgba(255, 181, 71, .3); --wp-glow2: rgba(229, 96, 43, .3); }
.pd-wp--raffking { --wp-a: #0b6a6e; --wp-c: #0a565e; --wp-b: #083f4a; --wp-glow1: rgba(47, 212, 167, .22); --wp-glow2: rgba(18, 138, 143, .35); }

.pd-wall,
.pd-swatch__art {
  background:
    radial-gradient(75% 45% at 12% 8%, var(--wp-glow1), transparent 70%),
    radial-gradient(70% 45% at 92% 96%, var(--wp-glow2), transparent 70%),
    linear-gradient(170deg, var(--wp-a), var(--wp-c) 50%, var(--wp-b));
}
.pd-wall {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
/* The waves: two bands of white, a screen and a half wide, drifting very slowly. */
.pd-wall::before,
.pd-wall::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 300%;
  height: 58%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 400' preserveAspectRatio='none'%3E%3Cpath d='M0 120C150 60 300 60 450 120S750 180 900 120 1050 60 1200 120V400H0Z' fill='%23fff' fill-opacity='.07'/%3E%3C/svg%3E") 0 0 / 50% 100% repeat-x;
  animation: pd-drift 90s linear infinite;
}
.pd-wall::after {
  height: 40%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 400' preserveAspectRatio='none'%3E%3Cpath d='M0 160C200 100 400 220 600 160S1000 100 1200 160V400H0Z' fill='%23fff' fill-opacity='.06'/%3E%3C/svg%3E");
  animation-duration: 140s;
  animation-direction: reverse;
}
@keyframes pd-drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.pd-screen--pic .pd-wall { background: var(--pd-wallpaper) center / cover no-repeat, #0e1226; }
.pd-screen--pic .pd-wall::before, .pd-screen--pic .pd-wall::after { display: none; }
/* Dark mode's veil. */
.pd-phone[data-pd-theme="dark"] .pd-wall { box-shadow: inset 0 0 0 100vmax rgba(3, 6, 16, .3); }
@media (prefers-color-scheme: dark) {
  .pd-phone:not([data-pd-theme]) .pd-wall { box-shadow: inset 0 0 0 100vmax rgba(3, 6, 16, .3); }
}

.pd-status {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  height: var(--pd-status-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  font-size: 14px;
  font-weight: 600;
  direction: ltr;
}
.pd-phone--pill .pd-status { padding: 0 32px; }
.pd-status__icons { display: inline-flex; align-items: center; gap: 6px; }
.pd-status__signal { width: 17px; height: 11px; background: linear-gradient(to right, currentColor 0 3px, transparent 3px 4.5px, currentColor 4.5px 7.5px, transparent 7.5px 9px, currentColor 9px 12px, transparent 12px 13.5px, currentColor 13.5px); clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.pd-status__wifi {
  width: 16px;
  height: 12px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 12'%3E%3Cpath d='M8 12 5.6 9.2a3.6 3.6 0 0 1 4.8 0z'/%3E%3Cpath d='M3.6 6.9a6.6 6.6 0 0 1 8.8 0l-1.3 1.5a4.6 4.6 0 0 0-6.2 0z'/%3E%3Cpath d='M1.3 4.3a10 10 0 0 1 13.4 0L13.4 5.8a8 8 0 0 0-10.8 0z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 12'%3E%3Cpath d='M8 12 5.6 9.2a3.6 3.6 0 0 1 4.8 0z'/%3E%3Cpath d='M3.6 6.9a6.6 6.6 0 0 1 8.8 0l-1.3 1.5a4.6 4.6 0 0 0-6.2 0z'/%3E%3Cpath d='M1.3 4.3a10 10 0 0 1 13.4 0L13.4 5.8a8 8 0 0 0-10.8 0z'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* The battery: its fill follows --pd-battery (0 to 1, set by the script as
   it drains slowly; it stops well above any low-battery warning). */
.pd-status__battery { position: relative; width: 24px; height: 12px; margin-inline-end: 2px; border-radius: 3px; border: 1.5px solid currentColor; opacity: .85; }
.pd-status__battery::before { content: ""; position: absolute; top: 2.5px; right: -4px; width: 2px; height: 4px; border-radius: 0 1px 1px 0; background: currentColor; }
.pd-status__battery::after { content: ""; position: absolute; top: 1.5px; bottom: 1.5px; left: 1.5px; width: calc((100% - 3px) * var(--pd-battery, .86)); border-radius: 1px; background: currentColor; }
.pd-status__pct { font-size: 12px; font-variant-numeric: tabular-nums; }
.pd-status__pct:empty { display: none; }
.pd-status__clock { display: inline-flex; align-items: baseline; gap: 6px; }
.pd-status__date { display: none; font-weight: 500; }
/* The order on the right follows the device's status style (data-pd-status,
   from SHOP_PHONE_DEMO_SHELL): 'signal' shows signal, Wi-Fi, battery; 'wifi'
   Wi-Fi, signal, battery and its percentage; 'date' the date beside the time
   and the percentage before the battery, and no signal. */
.pd-phone[data-pd-status="signal"] .pd-status__pct { display: none; }
.pd-phone[data-pd-status="wifi"] .pd-status__wifi { order: -1; }
.pd-phone[data-pd-status="wifi"] .pd-status__battery { order: 1; }
.pd-phone[data-pd-status="wifi"] .pd-status__pct { order: 2; }
.pd-phone[data-pd-status="date"] .pd-status__date { display: inline; }
.pd-phone[data-pd-status="date"] .pd-status__signal { display: none; }
.pd-status__cam { position: absolute; left: 50%; transform: translateX(-50%); background: #000; }
.pd-phone--edge .pd-status__cam { top: 11px; width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 3px #181c24; }
.pd-phone--pill .pd-status__cam { top: 12px; width: 84px; height: 24px; border-radius: 12px; }
.pd-phone--tablet .pd-status__cam { display: none; }
/* A tablet's front camera sits in the bezel, not the screen. */
.pd-bezel-cam { display: none; }
.pd-phone:not([data-pd-cam="screen"]) .pd-bezel-cam { display: block; position: absolute; z-index: 1; top: calc(var(--pd-bezel) / 2 - 4px); left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #0b0e14; box-shadow: inset 0 0 0 2px #1d2330; }
.pd-phone[data-pd-cam="side"] .pd-bezel-cam { top: 50%; left: calc(var(--pd-bezel) / 2 - 4px); margin: -4px 0 0; }

.pd-home {
  position: absolute;
  inset: 0;
  padding: calc(var(--pd-status-h) + 20px) 20px 120px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  overflow-y: auto;
}
.pd-phone--tablet .pd-home { padding-inline: 48px; gap: 32px; }

/* Widgets: the clock, and how many demos there are to try. */
.pd-widgets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pd-widget {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 132px;
  padding: 14px 16px;
  border-radius: 22px;
  background: var(--pd-glass);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.pd-widget--clock { align-items: center; text-align: center; }
.pd-home__time { font-size: 36px; white-space: nowrap; font-weight: 300; line-height: 1; letter-spacing: -1px; }
.pd-home__date { font-size: 13px; opacity: .85; }
.pd-widget__num { font-size: 40px; font-weight: 700; line-height: 1; }
.pd-widget__note { font-size: 12px; opacity: .75; }
.pd-home__hint { margin: 0; font-size: 14px; line-height: 1.4; text-align: center; opacity: .9; }

.pd-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 10px;
}
.pd-phone--tablet .pd-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 32px 16px; }
.pd-phone--tablet .pd-app-icon__tile { width: 76px; height: 76px; }
.pd-phone--tablet .pd-app-icon__label { font-size: 14px; }
.pd-app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #fff;
  text-decoration: none;
}
.pd-app-icon:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 16px; }
/* A press dips the icon a little; a long press makes them all wiggle. */
.pd-app-icon, .pd-dock__item { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.pd-app-icon__tile, .pd-app-icon .pd-sys, .pd-dock__item .pd-sys { transition: transform .12s ease-out, filter .12s ease-out; }
.pd-app-icon:active .pd-app-icon__tile, .pd-app-icon:active .pd-sys, .pd-dock__item:active .pd-sys { transform: scale(.9); filter: brightness(.92); }
.pd-phone.is-jiggle .pd-app-icon__tile, .pd-phone.is-jiggle .pd-app-icon .pd-sys, .pd-phone.is-jiggle .pd-dock__item .pd-sys { animation: pd-jiggle .26s ease-in-out infinite alternate; }
.pd-phone.is-jiggle li:nth-child(even) .pd-app-icon__tile, .pd-phone.is-jiggle li:nth-child(even) .pd-sys, .pd-phone.is-jiggle .pd-dock__item:nth-child(even) .pd-sys { animation-delay: -.13s; }
@keyframes pd-jiggle { from { transform: rotate(-2.2deg); } to { transform: rotate(2.2deg); } }

/* An app's square icon: drawn in the family's colours, under the uploaded picture if any. */
.pd-app-icon__tile,
.pd-splash__tile {
  position: relative;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 22.5%;
  background: linear-gradient(145deg, #5b6b8c, #2d3a57);
  color: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .25);
  overflow: hidden; /* the icon's rounded-square mask */
}
.pd-tile--prizex { background: linear-gradient(145deg, #4f8cff, #6a3df0); }
.pd-tile--bidking { background: linear-gradient(145deg, #ffb547, #e5602b); }
.pd-tile--raffking { background: linear-gradient(145deg, #2fd4a7, #128a8f); }
.pd-tile--wooauctions { background: linear-gradient(145deg, #a879ff, #5a2fb8); }
.pd-app-icon__tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-app-icon__letter { font-size: 22px; font-weight: 800; letter-spacing: -.5px; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.pd-app-icon__label {
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}

/*
 * The dock, along the foot of the home screen. A phone's holds four of the
 * system apps; a tablet's, wider, all six and then, after a divider, the
 * demos opened last (assets/js/phone-demo.js fills .pd-dock__recent).
 */
.pd-dock {
  position: absolute;
  z-index: 3;
  left: 14px;
  right: 14px;
  bottom: 26px;
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px 8px;
  border-radius: 30px;
  background: var(--pd-glass);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.pd-phone[data-pd-nav="buttons"] .pd-dock { bottom: 58px; }
/* The three buttons stay below the panels, as on the phone itself, so each
   panel ends above them and its Close button is never under them. */
.pd-phone[data-pd-nav="buttons"] .pd-shade, .pd-phone[data-pd-nav="buttons"] .pd-cc { bottom: 48px; }
/* The home bar sits over the panels' foot, so their Close button ends above it. */
.pd-phone[data-pd-nav="bar"] .pd-shade, .pd-phone[data-pd-nav="bar"] .pd-cc { padding-bottom: 26px; }
.pd-phone--tablet .pd-dock { left: 50%; right: auto; transform: translateX(-50%); justify-content: center; gap: 18px; padding: 12px 18px 10px; }
.pd-dock__item {
  font: inherit;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  flex: 1 1 0;
  min-width: 0;
  max-width: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border-radius: 14px;
}
.pd-phone--tablet .pd-dock__item { flex: none; width: 72px; font-size: 12px; }
.pd-phone--tablet .pd-dock .pd-sys, .pd-dock__recent .pd-app-icon__tile { width: 58px; height: 58px; background-size: 30px; }
.pd-dock__item__label { overflow-wrap: anywhere; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.pd-dock__recent { display: flex; gap: 18px; padding-inline-start: 18px; border-inline-start: 1px solid rgba(255, 255, 255, .3); }
.pd-dock__recent .pd-app-icon { width: 72px; font-size: 12px; }
.pd-dock__recent .pd-app-icon__letter { font-size: 19px; }

/* A system app's icon: our own line drawing in the brand's blue on a pale tile. */
.pd-sys {
  position: relative;
  display: block;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 22.5%;
  background: rgba(255, 255, 255, .92) center / 28px no-repeat;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .22);
}
.pd-app-icon .pd-sys { width: 62px; height: 62px; background-size: 32px; }
.pd-phone--tablet .pd-app-icon .pd-sys { width: 76px; height: 76px; background-size: 38px; }
.pd-sys--big { width: 88px; height: 88px; background-size: 46px; }
.pd-sys--phone { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230074cc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.5 3h2.6l1.4 4.2-2.1 1.6a10.5 10.5 0 0 0 5.8 5.8l1.6-2.1 4.2 1.4v2.6a2.5 2.5 0 0 1-2.5 2.5C10.6 19 5 13.4 5 5.5A2.5 2.5 0 0 1 7.5 3z'/%3E%3C/svg%3E"); }
.pd-sys--chat { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230074cc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h10a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H9l-4 3v-3H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z'/%3E%3Cpath d='M19 9a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2v3l-4-3h-3a2 2 0 0 1-1.7-1'/%3E%3C/svg%3E"); }
.pd-sys--browser { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230074cc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2.5'/%3E%3Cpath d='M3 9h18M7 14h6M7 17h10'/%3E%3Ccircle cx='6' cy='6.5' r='.4'/%3E%3Ccircle cx='8.5' cy='6.5' r='.4'/%3E%3C/svg%3E"); }
.pd-sys--mail { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230074cc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2.5'/%3E%3Cpath d='m3.5 7.5 8.5 6 8.5-6'/%3E%3C/svg%3E"); }
.pd-sys--settings { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230074cc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h9M18 7h2M4 17h3M12 17h8'/%3E%3Ccircle cx='15.5' cy='7' r='2.3'/%3E%3Ccircle cx='9.5' cy='17' r='2.3'/%3E%3C/svg%3E"); }
.pd-sys--addons { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230074cc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7.5' height='7.5' rx='2'/%3E%3Crect x='13.5' y='3' width='7.5' height='7.5' rx='2'/%3E%3Crect x='3' y='13.5' width='7.5' height='7.5' rx='2'/%3E%3Cpath d='M17.25 13.5v7.5M13.5 17.25H21'/%3E%3C/svg%3E"); }
.pd-sys--controls { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230074cc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='8' height='8' rx='4'/%3E%3Crect x='13' y='3' width='8' height='8' rx='2'/%3E%3Crect x='3' y='13' width='8' height='8' rx='2'/%3E%3Cpath d='M17 13v8'/%3E%3C/svg%3E"); }
.pd-sys--bell { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230074cc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9'/%3E%3Cpath d='M10.3 21a1.94 1.94 0 0 0 3.4 0'/%3E%3C/svg%3E"); }
.pd-badge {
  position: absolute;
  top: -5px;
  inset-inline-end: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: #e5484d;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}
button.pd-app-icon { font: inherit; padding: 0; border: 0; background: none; cursor: pointer; }
[data-pd-shade-toggle][hidden], [data-pd-cc-toggle][hidden], [data-pd-open][hidden] { display: none; }

/*
 * The notification panel. Pulled down from the top strip (.pd-pull, touch or
 * mouse) or opened with the dock's button; it slides from above the screen.
 * While a finger drags it, assets/js/phone-demo.js sets its offset directly
 * (.is-dragging turns the slide off).
 */
.pd-pull {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--pd-status-h) + 14px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
  cursor: grab;
  touch-action: none;
}
.pd-pull span { width: 36px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .45); }
/* The top's last third (the battery side) pulls down the control centre instead. */
.pd-pull[data-pd-pull] { inset-inline-end: 34%; }
.pd-pull--cc { inset-inline-start: auto; width: 34%; justify-content: flex-end; padding-inline-end: 22px; }
.pd-pull--cc span { width: 24px; }

/* The control centre: a panel like the notifications', of tiles that act. */
.pd-cc {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: calc(var(--pd-status-h) + 12px) 16px 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(10, 14, 30, .78);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  transform: translateY(-100%);
  transition: transform .28s ease-out;
}
.pd-cc.is-open { transform: none; }
.pd-cc__title { margin: 0; font-size: 15px; font-weight: 600; }
.pd-cc__title:focus { outline: none; }
.pd-cc__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pd-phone--tablet .pd-cc__grid { grid-template-columns: repeat(4, 1fr); }
.pd-cc__tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 92px;
  padding: 14px;
  border: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: start;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.pd-cc__tile--wide { grid-column: 1 / -1; min-height: 0; }
.pd-phone--tablet .pd-cc__tile--wide { grid-column: span 2; }
.pd-cc__tile[aria-checked="true"] { background: #fff; color: #14202e; }
.pd-cc__tile:focus-visible, .pd-cc__tile:focus-within { outline: 2px solid #fff; outline-offset: 2px; }
.pd-cc__value { font-weight: 400; font-size: 12px; opacity: .8; }
.pd-cc__tile input[type="range"] { width: 100%; margin: 4px 0 0; accent-color: #fff; }
.pd-cc__glyph { width: 26px; height: 26px; background: currentColor; -webkit-mask: var(--g) center / contain no-repeat; mask: var(--g) center / contain no-repeat; }
.pd-cc__glyph--dark { --g: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 14.5A8.5 8.5 0 0 1 9.5 4a8.5 8.5 0 1 0 10.5 10.5z'/%3E%3C/svg%3E"); }
.pd-cc__glyph--wall { --g: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='3'/%3E%3Cpath d='m3 16 5-5 4 4 3-3 6 6'/%3E%3Ccircle cx='16' cy='8.5' r='1.5'/%3E%3C/svg%3E"); }
.pd-cc__glyph--sun { --g: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M2 12h2M20 12h2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E"); }
.pd-cc .pd-shade__close { margin-top: auto; }

/* Brightness: a dark veil over the whole screen, never catching a tap. */
.pd-dim { position: absolute; inset: 0; z-index: 10; background: #000; opacity: var(--pd-dim, 0); pointer-events: none; }

/* The lock screen a visit starts on: the wallpaper, a big clock, and a hint
   to swipe up. The whole of it is one button, so a tap or a key opens it. */
.pd-lock {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: calc(var(--pd-status-h) + 18px) 24px 40px;
  border: 0;
  background: rgba(4, 8, 20, .22);
  color: #fff;
  font: inherit;
  cursor: pointer;
  touch-action: none;
  transition: transform .32s ease-in, opacity .32s ease-in;
}
.pd-lock[hidden] { display: none; }
/* Under the lock only the wallpaper shows. The home screen stays in the page
   (fading back on unlock), so focus can still reach it, and that opens the lock. */
.pd-home, .pd-dock, .pd-toasts { transition: opacity .3s ease-out; }
.pd-phone.is-locked .pd-home, .pd-phone.is-locked .pd-dock, .pd-phone.is-locked .pd-toasts, .pd-phone.is-locked .pd-pull { opacity: 0; }
.pd-lock.is-dragging { transition: none; }
.pd-lock.is-leaving { transform: translateY(-100%); opacity: 0; }
.pd-lock:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
.pd-lock__glyph { width: 18px; height: 22px; margin-bottom: 8px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 22' fill='none' stroke='%23000' stroke-width='2.2'%3E%3Crect x='2' y='9' width='14' height='11' rx='2.5' fill='%23000'/%3E%3Cpath d='M5 9V6a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 22' fill='none' stroke='%23000' stroke-width='2.2'%3E%3Crect x='2' y='9' width='14' height='11' rx='2.5' fill='%23000'/%3E%3Cpath d='M5 9V6a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat; }
.pd-lock__date { font-size: 18px; font-weight: 500; text-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
.pd-lock__time { font-size: 88px; font-weight: 300; line-height: 1; letter-spacing: -.02em; white-space: nowrap; text-shadow: 0 2px 14px rgba(0, 0, 0, .35); }
.pd-phone--tablet .pd-lock__time { font-size: 120px; }
.pd-lock__hint { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; text-shadow: 0 1px 6px rgba(0, 0, 0, .45); }
.pd-lock__arrow { width: 14px; height: 14px; border-top: 2.5px solid currentColor; border-left: 2.5px solid currentColor; transform: rotate(45deg); animation: pd-nudge 1.6s ease-in-out infinite; }
@keyframes pd-nudge { 0%, 100% { transform: translateY(4px) rotate(45deg); opacity: .5; } 50% { transform: translateY(-4px) rotate(45deg); opacity: 1; } }

/* The drawn keyboard that rises while the chat's message box has focus.
   It is only a picture: the visitor's own keyboard does the typing. */
.pd-kbd {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 10px 4px 34px;
  background: #d1d5dd;
  transform: translateY(100%);
  transition: transform .25s ease-out;
  pointer-events: none;
}
.pd-phone[data-pd-nav="buttons"] .pd-kbd { padding-bottom: 56px; }
.pd-phone.is-kbd .pd-kbd { transform: none; }
.pd-kbd__row { display: flex; justify-content: center; gap: 5px; padding: 0 2px; }
.pd-kbd__key { flex: 0 1 34px; height: 40px; border-radius: 6px; background: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .3); }
.pd-kbd__key--fn { flex-basis: 44px; background: #abb1bc; }
.pd-kbd__key--space { flex: 1 1 auto; max-width: 60%; }
.pd-kbd__key--enter { flex-basis: 84px; }
.pd-phone--tablet .pd-kbd__key { flex-basis: 64px; height: 54px; }
.pd-phone[data-pd-theme="dark"] .pd-kbd { background: #2b2f37; }
.pd-phone[data-pd-theme="dark"] .pd-kbd__key { background: #5a5f69; }
.pd-phone[data-pd-theme="dark"] .pd-kbd__key--fn { background: #40444c; }
@media (prefers-color-scheme: dark) {
  .pd-phone:not([data-pd-theme]) .pd-kbd { background: #2b2f37; }
  .pd-phone:not([data-pd-theme]) .pd-kbd__key { background: #5a5f69; }
  .pd-phone:not([data-pd-theme]) .pd-kbd__key--fn { background: #40444c; }
}
.pd-phone.is-kbd .pd-app, .pd-phone.is-kbd[data-pd-nav] .pd-app { padding-bottom: var(--pd-kbd-h, 0px); }
.pd-shade {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: calc(var(--pd-status-h) + 8px) 14px 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(10, 14, 30, .82);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  transform: translateY(-100%);
  transition: transform .28s ease-out;
}
.pd-shade.is-open { transform: none; }
.pd-shade.is-dragging { transition: none; }
.pd-shade__clock { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.pd-shade__time { font-size: 32px; font-weight: 300; white-space: nowrap; }
.pd-shade__date { font-size: 13px; color: var(--pd-ink-soft); }
.pd-shade__title { margin: 4px 0 0; font-size: 15px; font-weight: 600; }
.pd-shade__title:focus { outline: none; }
.pd-shade__sample { margin: -6px 0 0; font-size: 12px; color: var(--pd-ink-soft); }
.pd-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pd-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .12);
}
a.pd-note, a.pd-toast__open { color: inherit; text-decoration: none; }
a.pd-note { transition: background-color .15s; }
a.pd-note:hover { background: rgba(255, 255, 255, .2); }
a.pd-note:focus-visible { outline: 2px solid var(--pd-app-accent); outline-offset: 2px; }
.pd-note__tile {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 22.5%;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}
.pd-note__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.pd-note__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; font-size: 11px; color: var(--pd-ink-soft); }
.pd-note__app { font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.pd-note__title { font-size: 13.5px; }
.pd-note__body { color: #dfe4ee; }
.pd-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(79, 140, 255, .35), rgba(106, 61, 240, .35));
  border: 1px solid rgba(255, 255, 255, .18);
  font-size: 13px;
  line-height: 1.4;
}
.pd-cta__title { font-size: 15px; }
.pd-cta__btn {
  margin-top: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: #fff;
  color: #1b2a55;
  font-weight: 700;
  text-decoration: none;
}
.pd-cta__btn:hover { background: #e8eeff; }
.pd-shade__close {
  /* Stays at the panel's foot while the notes scroll, so it is always there to tap or push up. */
  position: sticky;
  bottom: -14px;
  margin: auto -14px -14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 18px 14px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(to bottom, rgba(10, 14, 30, 0), rgba(10, 14, 30, .92) 45%);
  color: var(--pd-ink-soft);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  touch-action: none;
}
.pd-shade__grip { width: 44px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .6); }

/*
 * A system app's screen, over the home screen and under the notification
 * panel and the navigation: a bar with the back control and the title, then
 * its body. Light or dark follows Settings, else the visitor's own setting.
 */
.pd-phone {
  --pd-app-bg: #f4f6fa;
  --pd-app-card: #fff;
  --pd-app-ink: #14202e;
  --pd-app-soft: #4f5b6b;
  --pd-app-line: #dfe4ec;
  --pd-app-accent: #0074cc;
  --pd-app-on-accent: #fff;
  --pd-app-me: #0074cc;
}
.pd-phone[data-pd-theme="dark"] {
  --pd-app-bg: #0f1420;
  --pd-app-card: #1a2130;
  --pd-app-ink: #f2f5fa;
  --pd-app-soft: #aab4c3;
  --pd-app-line: #2a3344;
  --pd-app-accent: #4aa8ff;
  --pd-app-on-accent: #06182c;
  --pd-app-me: #1f5fa8;
}
@media (prefers-color-scheme: dark) {
  .pd-phone:not([data-pd-theme]) {
    --pd-app-bg: #0f1420;
    --pd-app-card: #1a2130;
    --pd-app-ink: #f2f5fa;
    --pd-app-soft: #aab4c3;
    --pd-app-line: #2a3344;
    --pd-app-accent: #4aa8ff;
    --pd-app-on-accent: #06182c;
    --pd-app-me: #1f5fa8;
  }
}
.pd-app {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  padding-top: var(--pd-status-h);
  padding-bottom: 26px;
  background: var(--pd-app-bg);
  color: var(--pd-app-ink);
}
.pd-phone[data-pd-nav="buttons"] .pd-app { padding-bottom: 48px; }
.pd-phone.is-in-app .pd-status { z-index: 6; color: var(--pd-app-ink); }
/* The script zooms a screen out of the icon that opened it and back into it. */
.pd-app.is-zooming, .pd-splash.is-zooming { will-change: transform, opacity; overflow: hidden; border-radius: var(--pd-radius); }

/* The pop-ups that drop in from the top, over everything but the panel. */
.pd-toasts { position: absolute; z-index: 7; top: calc(var(--pd-status-h) + 6px); left: 10px; right: 10px; display: grid; gap: 8px; pointer-events: none; }
.pd-phone--tablet .pd-toasts { left: auto; right: 16px; width: 380px; }
[dir="rtl"] .pd-phone--tablet .pd-toasts { right: auto; left: 16px; }
.pd-toast {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: stretch;
  border-radius: 22px;
  background: color-mix(in srgb, var(--pd-app-card) 88%, transparent);
  color: var(--pd-app-ink);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  transform: translateY(calc(-100% - var(--pd-status-h) - 12px));
  opacity: 0;
  transition: transform .34s cubic-bezier(.2, .9, .3, 1.15), opacity .2s ease-out;
}
.pd-toast.is-in { transform: none; opacity: 1; }
.pd-toast[hidden] { display: none; }
.pd-toast__open { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 10px; padding: 12px 4px 12px 12px; border: 0; border-radius: 22px 0 0 22px; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
[dir="rtl"] .pd-toast__open { padding: 12px 12px 12px 4px; border-radius: 0 22px 22px 0; }
.pd-toast .pd-note__meta { color: var(--pd-app-soft); }
.pd-toast .pd-note__body { color: var(--pd-app-soft); }
.pd-toast .pd-mail__tag { text-transform: none; letter-spacing: 0; }
.pd-toast__close { flex: none; width: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 0 22px 22px 0; background: none; color: var(--pd-app-soft); cursor: pointer; }
[dir="rtl"] .pd-toast__close { border-radius: 22px 0 0 22px; }
.pd-toast__close span { width: 12px; height: 12px; background: linear-gradient(45deg, transparent 45%, currentColor 45% 55%, transparent 55%), linear-gradient(-45deg, transparent 45%, currentColor 45% 55%, transparent 55%); }
.pd-toast__open:focus-visible, .pd-toast__close:focus-visible { outline: 2px solid var(--pd-app-accent); outline-offset: -3px; }

/* Words a screen reader says that the screen shows another way (a badge's count). */
.pd-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.pd-app__head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--pd-app-line);
}
.pd-app__back {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 10px 0 8px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--pd-app-accent);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.pd-app__back:hover { background: var(--pd-app-line); }
.pd-app__back:focus-visible, .pd-app__btn:focus-visible, .pd-set__row:focus-visible, .pd-url__out:focus-visible, .pd-mail__item summary:focus-visible { outline: 2px solid var(--pd-app-accent); outline-offset: 2px; }
.pd-app__back-arrow { width: 10px; height: 10px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-inline-start: 4px; }
[dir="rtl"] .pd-app__back-arrow { transform: rotate(-135deg); }
.pd-app__title { flex: 1; min-width: 0; margin: 0; font-size: 17px; font-weight: 650; overflow-wrap: anywhere; }
.pd-app__title:focus { outline: none; }
.pd-app__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: 14px;
  line-height: 1.45;
}
.pd-phone--tablet .pd-app__body { padding: 24px 48px; font-size: 15px; }
.pd-app__body > * { flex-shrink: 0; }
.pd-app__body--center { align-items: center; justify-content: center; text-align: center; gap: 14px; }
.pd-app__lead { margin: 6px 0 0; font-size: 20px; font-weight: 650; }
.pd-app__text { margin: 0; max-width: 34ch; color: var(--pd-app-soft); }
.pd-app__sample, .pd-app__note { margin: 0; font-size: 12.5px; color: var(--pd-app-soft); }
.pd-app__btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 1.5px solid var(--pd-app-accent);
  border-radius: 999px;
  background: var(--pd-app-accent);
  color: var(--pd-app-on-accent);
  font: inherit;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.pd-app__btn--ghost { background: transparent; color: var(--pd-app-accent); }

/* The support chat: example messages, then the two ways to really ask. */
.pd-chat__log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pd-chat__msg { max-width: 82%; padding: 9px 13px; border-radius: 18px; overflow-wrap: anywhere; }
.pd-chat__msg--them { align-self: flex-start; background: var(--pd-app-card); border: 1px solid var(--pd-app-line); border-end-start-radius: 6px; }
.pd-chat__msg--me { align-self: flex-end; background: var(--pd-app-me); color: #fff; border-end-end-radius: 6px; }
.pd-chat__actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
.pd-chat__compose { display: flex; gap: 8px; align-items: center; padding-top: 4px; }
.pd-chat__compose[hidden] { display: none; }
.pd-chat__input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border: 1px solid var(--pd-app-line); border-radius: 20px; background: var(--pd-app-card); color: var(--pd-app-ink); font: inherit; }
.pd-chat__input::placeholder { color: var(--pd-app-soft); }
.pd-chat__input:focus-visible { outline: 2px solid var(--pd-app-accent); outline-offset: 1px; }
.pd-chat__send { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--pd-app-accent); color: var(--pd-app-on-accent); cursor: pointer; }
.pd-chat__send::before { content: ""; display: block; width: 18px; height: 18px; margin: auto; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4 5 11l1.4 1.4L11 7.8V20h2V7.8l4.6 4.6L19 11z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4 5 11l1.4 1.4L11 7.8V20h2V7.8l4.6 4.6L19 11z'/%3E%3C/svg%3E") center / contain no-repeat; }
.pd-chat__send:focus-visible { outline: 2px solid var(--pd-app-accent); outline-offset: 2px; }

/* The browser's address bar, and a page of the shop inside the phone. */
.pd-app--web { padding-bottom: 0; }
.pd-phone[data-pd-nav="buttons"] .pd-app--web { padding-bottom: 48px; }
.pd-url {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 12px;
  padding: 7px 8px 7px 12px;
  border-radius: 999px;
  background: var(--pd-app-card);
  border: 1px solid var(--pd-app-line);
  font-size: 13px;
}
.pd-url__lock { flex: none; width: 10px; height: 8px; margin-top: 4px; border-radius: 2px; background: var(--pd-app-soft); position: relative; }
.pd-url__lock::before { content: ""; position: absolute; left: 2px; top: -5px; width: 6px; height: 6px; border: 1.5px solid var(--pd-app-soft); border-bottom: 0; border-radius: 4px 4px 0 0; box-sizing: border-box; }
.pd-url__text { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--pd-app-ink); }
.pd-url__out { flex: none; padding: 4px 10px; border-radius: 999px; color: var(--pd-app-accent); font-size: 12px; text-decoration: none; }
.pd-url__out:hover { background: var(--pd-app-line); }
.pd-web { flex: 1; min-height: 0; width: 100%; border: 0; background: #fff; }

/* Mail: example emails, each opening in place. */
.pd-mail { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pd-mail__item { border-radius: 16px; background: var(--pd-app-card); border: 1px solid var(--pd-app-line); }
.pd-mail__item summary { display: flex; gap: 10px; padding: 12px; cursor: pointer; list-style: none; border-radius: 16px; }
.pd-mail__item summary::-webkit-details-marker { display: none; }
.pd-mail__head { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.pd-mail__from { font-size: 12px; font-weight: 600; color: var(--pd-app-soft); }
.pd-mail__tag { display: inline-block; margin-inline-start: 4px; padding: 0 6px; border-radius: 999px; border: 1px solid var(--pd-app-line); font-weight: 500; font-size: 11px; }
.pd-mail__subject { font-size: 14px; }
.pd-mail__preview { font-size: 12.5px; color: var(--pd-app-soft); }
.pd-mail__item[open] .pd-mail__preview { display: none; }
.pd-mail__body { padding: 0 14px 14px 54px; }
[dir="rtl"] .pd-mail__body { padding: 0 54px 14px 14px; }
.pd-mail__body p { margin: 0; white-space: pre-line; }

/* Settings: lists of rows, and the wallpapers to pick from. */
.pd-set { list-style: none; margin: 0; padding: 0; border: 0; min-width: 0; border-radius: 16px; background: var(--pd-app-card); overflow: hidden; }
.pd-set__head { margin: 8px 4px 0; padding: 0; font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--pd-app-soft); }
.pd-set--choice > .pd-set__head, .pd-set--walls > .pd-set__head { margin: 0 0 6px; padding: 0 4px; }
.pd-set--choice, .pd-set--walls { background: none; overflow: visible; }
.pd-set__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--pd-app-line);
  color: var(--pd-app-ink);
  text-decoration: none;
  cursor: pointer;
}
.pd-set li:last-child .pd-set__row { border-bottom: 0; }
.pd-set--choice .pd-set__row { background: var(--pd-app-card); }
.pd-set--choice .pd-set__row:first-of-type { border-radius: 16px 16px 0 0; }
.pd-set--choice .pd-set__row:last-of-type { border-radius: 0 0 16px 16px; border-bottom: 0; }
.pd-set__row input { width: 20px; height: 20px; margin: 0; accent-color: var(--pd-app-accent); }
.pd-set__mark { width: 12px; height: 7px; border-left: 2px solid var(--pd-app-accent); border-bottom: 2px solid var(--pd-app-accent); transform: rotate(-45deg); visibility: hidden; }
.pd-set__row[aria-current] .pd-set__mark { visibility: visible; }
.pd-set__row[aria-current] { font-weight: 650; }
.pd-set--walls { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 12px 10px; }
.pd-swatch { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font-size: 12px; text-align: center; }
.pd-swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pd-swatch__art { position: relative; display: block; width: 64px; height: 112px; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.pd-swatch input:checked + .pd-swatch__art { box-shadow: 0 0 0 3px var(--pd-app-bg), 0 0 0 5px var(--pd-app-accent); }
.pd-swatch input:focus-visible + .pd-swatch__art { outline: 2px solid var(--pd-app-accent); outline-offset: 5px; }
.pd-swatch__name { overflow-wrap: anywhere; }
.pd-grid--recents { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
.pd-grid--recents .pd-app-icon { color: var(--pd-app-ink); }
.pd-grid--recents .pd-app-icon__label { text-shadow: none; }

/*
 * The foot of the screen: three drawn buttons (back, home, recent apps) or a
 * line to tap or swipe up. Both go home from any screen; the line without
 * script is only a drawing.
 */
.pd-navbar {
  position: absolute;
  z-index: 7;
  left: 0;
  right: 0;
  bottom: 0;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18%;
  direction: ltr;
}
.pd-phone--tablet .pd-navbar { gap: 120px; }
.pd-navbar__btn { position: relative; width: 48px; height: 40px; border: 0; border-radius: 20px; background: none; color: #fff; cursor: pointer; }
.pd-navbar__btn:hover { background: rgba(127, 127, 127, .18); }
.pd-navbar__btn::before { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); box-sizing: border-box; border: 2px solid currentColor; }
.pd-navbar__btn--back::before { width: 12px; height: 12px; border-width: 0 0 2.5px 2.5px; transform: translate(-30%, -50%) rotate(45deg); border-radius: 1px; }
.pd-navbar__btn--home::before { width: 18px; height: 18px; border-radius: 50%; }
.pd-navbar__btn--recents::before { width: 16px; height: 16px; border-radius: 4px; }
.pd-phone.is-in-app .pd-navbar__btn { color: var(--pd-app-ink); }

/* The splash an app shows while it opens. */
.pd-splash {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #0e1226;
  animation: pd-splash-in .25s ease-out;
}
.pd-splash__tile { width: 96px; height: 96px; }
.pd-splash__tile .pd-app-icon__letter { font-size: 34px; }
.pd-splash__name { font-size: 20px; font-weight: 600; text-align: center; padding: 0 24px; overflow-wrap: anywhere; }
.pd-splash__bar { width: 120px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.pd-splash__bar span { display: block; width: 40%; height: 100%; border-radius: 2px; background: #fff; animation: pd-load 1.1s ease-in-out infinite; }
.pd-splash__text { font-size: 13px; opacity: .75; text-align: center; padding: 0 24px; }
@keyframes pd-splash-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes pd-load { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
[dir="rtl"] .pd-splash__bar span { animation-direction: reverse; }

.pd-homebar {
  position: absolute;
  z-index: 7;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 180px;
  height: 26px;
  display: flex;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: none;
  cursor: pointer;
  touch-action: none;
}
.pd-homebar--still { pointer-events: none; }
.pd-homebar span {
  display: block;
  margin: 0 auto;
  height: 5px;
  width: 134px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .9);
}
.pd-phone.is-in-app .pd-homebar span { background: var(--pd-app-ink); }

.pd-caption { color: var(--pd-ink-soft); text-align: center; }
.pd-legal { max-width: 720px; margin: 0; color: var(--pd-ink-soft); font-size: 12px; line-height: 1.5; text-align: center; opacity: .8; }

@media (prefers-reduced-motion: reduce) {
  .pd-splash, .pd-app { animation: none; }
  .pd-toast { transform: none; transition: opacity .2s linear; }
  .pd-cc, .pd-kbd { transition: none; }
  .pd-slot, .pd-slot.is-tilted { transform: none; transition: none; }
  .pd-lock { transition: opacity .2s linear; }
  .pd-lock.is-leaving { transform: none; }
  .pd-lock__arrow { animation: none; }
  .pd-phone.is-jiggle .pd-app-icon__tile, .pd-phone.is-jiggle .pd-app-icon .pd-sys, .pd-phone.is-jiggle .pd-dock__item .pd-sys { animation: none; }
  .pd-app-icon__tile, .pd-app-icon .pd-sys, .pd-dock__item .pd-sys { transition: filter .12s linear; }
  .pd-app-icon:active .pd-app-icon__tile, .pd-app-icon:active .pd-sys, .pd-dock__item:active .pd-sys { transform: none; }
  .pd-wall::before, .pd-wall::after { animation: none; }
  .pd-shade { transition: none; }
  .pd-splash__bar span { animation: none; width: 100%; opacity: .6; }
}

/* A phone: no frame, the home screen is the visitor's own screen. */
@media (max-width: 719.98px) {
  /* The visitor's own keyboard comes up on a phone; the drawn one stays down. */
  .pd-kbd { display: none; }
  .pd-phone.is-kbd .pd-app, .pd-phone.is-kbd[data-pd-nav] .pd-app { padding-bottom: 0; }
  .pd-stage:has(.pd-phone) { padding: 0; gap: 0; }
  .pd-stage:has(.pd-phone) .pd-nav { position: absolute; z-index: 6; top: max(12px, env(safe-area-inset-top)); inset-inline: 12px; width: auto; }
  .pd-stage:has(.pd-phone) .pd-back { background: rgba(0, 0, 0, .35); }
  .pd-stage:has(.pd-phone) .pd-intro, .pd-caption, .pd-status, .pd-homebar, .pd-navbar { display: none !important; }
  .pd-phone { display: block; width: 100%; }
  .pd-slot { width: 100%; height: auto; min-height: 100vh; min-height: 100dvh; }
  .pd-device {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    transform: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }
  .pd-device::before, .pd-device::after { display: none; }
  .pd-slot.is-tilted { transform: none; }
  .pd-screen::after { display: none; }
  .pd-screen { position: relative; inset: auto; min-height: 100vh; min-height: 100dvh; border-radius: 0; }
  .pd-home, .pd-phone--tablet .pd-home { position: relative; }
  .pd-stage:has(.pd-phone) .pd-legal { padding: 16px 16px max(16px, env(safe-area-inset-bottom)); }
  .pd-home, .pd-phone--tablet .pd-home {
    padding: calc(max(12px, env(safe-area-inset-top)) + 56px) 16px calc(max(16px, env(safe-area-inset-bottom)) + 100px);
  }
  .pd-dock, .pd-phone[data-pd-nav="buttons"] .pd-dock { bottom: max(12px, env(safe-area-inset-bottom)); }
  .pd-phone[data-pd-nav="buttons"] .pd-shade, .pd-phone[data-pd-nav="buttons"] .pd-cc { bottom: 0; }
  .pd-phone[data-pd-nav="bar"] .pd-shade, .pd-phone[data-pd-nav="bar"] .pd-cc { padding-bottom: 14px; }
  .pd-phone--tablet .pd-dock { left: 12px; right: 12px; transform: none; gap: 6px; padding: 10px 8px 8px; }
  .pd-phone--tablet .pd-dock__item { flex: 1 1 0; width: auto; font-size: 11px; }
  .pd-phone--tablet .pd-dock .pd-sys { width: 44px; height: 44px; background-size: 24px; }
  .pd-dock__recent { display: none !important; }
  /* A screen covers the visitor's own screen, under the page's buttons at the top. */
  .pd-app, .pd-phone[data-pd-nav="buttons"] .pd-app, .pd-phone[data-pd-nav="buttons"] .pd-app--web {
    position: fixed;
    z-index: 7;
    padding: calc(max(12px, env(safe-area-inset-top)) + 44px) 0 env(safe-area-inset-bottom);
  }
  .pd-phone--tablet .pd-app__body { padding: 16px; font-size: 14px; }
  /* No status bar here: the strip to pull sits under the buttons at the top,
     and the panel covers the visitor's own screen. */
  .pd-pull { top: calc(max(12px, env(safe-area-inset-top)) + 40px); height: 28px; }
  .pd-shade {
    position: fixed;
    z-index: 7;
    /* Below the page's own buttons at the top, which stay in view. */
    padding: calc(max(12px, env(safe-area-inset-top)) + 52px) 16px max(16px, env(safe-area-inset-bottom));
  }
  .pd-shade__close { bottom: calc(-1 * max(16px, env(safe-area-inset-bottom))); margin: auto -16px calc(-1 * max(16px, env(safe-area-inset-bottom))); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .pd-grid, .pd-phone--tablet .pd-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
}
@media (max-width: 340px) {
  .pd-home__time { font-size: 30px; }
  .pd-app-icon__tile { width: 54px; height: 54px; }
  .pd-device-card { flex-wrap: wrap; }
}
