/* The page of an app's browser version: a slim bar of the site on top and the
   app below it, shaped like a phone on a computer and filling the screen on a
   phone. It is kept by the app's offline worker together with the app, so it
   uses nothing from the rest of the site. */
:root {
  color-scheme: dark light;
  --bg: #111118;
  --bg-2: #1A1A2F;
  --surf: rgba(255, 255, 255, 0.055);
  --surf-2: rgba(255, 255, 255, 0.09);
  --bdr: rgba(255, 255, 255, 0.08);
  --tx: #FFFFFF;
  --bezel: #26262f;
  --shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.14);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F2F2F7; --bg-2: #E5E5ED; --surf: rgba(0, 0, 0, .05); --surf-2: rgba(0, 0, 0, .09);
    --bdr: rgba(0, 0, 0, .09); --tx: #111111; --bezel: #16161c;
    --shadow: 0 40px 80px -30px rgba(30, 30, 60, .45), 0 0 0 1px rgba(0, 0, 0, .1);
  }
}
:root[data-theme="light"] {
  --bg: #F2F2F7; --bg-2: #E5E5ED; --surf: rgba(0, 0, 0, .05); --surf-2: rgba(0, 0, 0, .09);
  --bdr: rgba(0, 0, 0, .09); --tx: #111111; --bezel: #16161c;
  --shadow: 0 40px 80px -30px rgba(30, 30, 60, .45), 0 0 0 1px rgba(0, 0, 0, .1);
  color-scheme: light;
}
:root[data-theme="dark"] { color-scheme: dark; }

html, body { height: 100%; margin: 0; }
body {
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image: radial-gradient(110% 70% at 50% -10%, var(--bg-2) 0%, transparent 60%);
  background-repeat: no-repeat;
  color: var(--tx);
  font: 700 1rem/1.2 "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.play-bar {
  flex: none;
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--bdr);
  background: var(--surf);
}
.play-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px 0 6px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}
.play-back:hover { background: var(--surf-2); }
.play-back svg { width: 20px; height: 20px; flex: none; }
.play-back img { flex: none; }
[dir="rtl"] .play-back svg { transform: scaleX(-1); }

/* The phone keeps the height of the window, at most that of a large phone,
   and the width of a phone screen for that height, never narrower than a
   small phone. */
.play-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
  container-type: size;
}
.play-phone {
  position: relative;
  box-sizing: border-box;
  height: min(100cqh, 900px);
  width: min(100cqw, max(360px, min(100cqh, 900px) * 0.47));
  border: 10px solid var(--bezel);
  border-radius: 46px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow);
}

/* On a phone the app fills the screen below the bar. */
@media (max-width: 600px), (max-height: 520px) {
  .play-bar { min-height: 48px; padding: 0 8px; }
  .play-stage { padding: 0; }
  .play-phone { width: 100%; height: 100%; border: 0; border-radius: 0; box-shadow: none; }
}

/* Opened from the home screen it is an app of its own, without the bar, in
   the whole of its window. */
@media (display-mode: standalone), (display-mode: fullscreen) {
  .play-bar { display: none; }
  .play-stage { padding: 0; }
  .play-phone { width: 100%; height: 100%; border: 0; border-radius: 0; box-shadow: none; }
}
