/* sundayvisit.com.au/play/*: the app's own games and calm activities, played in the page (PLAY-PAGES).
   Each page opens the website's browser demo (/try/app/, scripts/try-demo.mjs) at one activity, in a frame beside
   the words on a wide screen and across the whole screen on a phone (play.js). The pages are written by
   scripts/play-pages/build.mjs. They wear the guides' look (guides.css): the same paper, inks, fonts, cards,
   questions, header and footer. This file adds the game's frame, the row of promises, the steps and the cards.

   Text 18px or more (staticPageTextSize.test.ts). Every min(), max() and clamp() has a plain line before it for
   Chrome 78, and flex rows use margins, not gap. */

/* ---------- The opening: the words, then the game ---------- */
.sv-play-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-row-gap: 1.75rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 0;
}
.sv-play-crumb { color: var(--ink-soft); font: 600 1.125rem/1.3 var(--sans); }
.sv-play-crumb a { color: var(--pine); }
.sv-play-crumb span { margin: 0 .4rem; }
.sv-play-hero h1 {
  margin-top: .75rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.25rem;
  font-size: clamp(2.25rem, 1.7rem + 2.2vw, 3.375rem);
  line-height: 1.06;
  letter-spacing: -.025em;
  font-variation-settings: "opsz" 72;
  text-wrap: balance;
}
.sv-play-lead { max-width: 36rem; margin-top: 1.1rem; font-size: 1.3125rem; line-height: 1.55; }
/* What every play page promises, as a row of soft pills. */
.sv-guide ul.sv-play-points { display: flex; flex-wrap: wrap; margin: .85rem 0 0 -.5rem; padding-left: 0; list-style: none; }
.sv-guide .sv-play-points li {
  margin: .5rem 0 0 .5rem;
  padding: .4rem .95rem;
  border-radius: 999px;
  background: var(--sage);
  color: var(--ink);
  font: 600 1.125rem/1.3 var(--sans);
}
.sv-play-actions { display: flex; flex-wrap: wrap; align-items: center; margin: 1rem 0 0 -.75rem; }
.sv-play-actions > * { margin: .75rem 0 0 .75rem; }
.sv-play-actions [hidden] { display: none; }
.sv-play-go, .sv-play-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 66px;
  padding: 0 2rem;
  border: 0;
  border-radius: 18px;
  font: 600 1.375rem/1.2 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.sv-guide a.sv-play-go, .sv-play-go { background: var(--pine); color: #fffdf8; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 10px 22px -12px rgba(19, 36, 59, .6); }
.sv-guide a.sv-play-go:hover, .sv-play-go:hover { background: var(--pine-hover); color: #fffdf8; }
.sv-guide a.sv-play-more, .sv-play-more { background: var(--card); color: var(--pine); box-shadow: inset 0 0 0 2px var(--pine); }
.sv-guide a.sv-play-more:hover, .sv-play-more:hover { background: var(--sage); color: var(--pine-hover); }
.sv-play-go svg { flex: none; width: 1.5rem; height: 1.5rem; margin-right: .6rem; }
.sv-play-note { max-width: 36rem; margin-top: 1rem; color: var(--ink-soft); font-size: 1.125rem; line-height: 1.5; }

/* ---------- The game's frame ----------
   The picture is the game's own first screen, and under it, inside the frame, a strip with Play, like the button
   under a screen. Nothing sits on top of the picture, so the whole of the game shows. On a phone the picture is
   three wide by four tall and Play opens the game across the whole screen. In a window 700px wide and 740px tall or
   more, the frame is a phone's own shape (390 by 844), as tall as the window allows, and the game plays inside it.
   The game is always given that phone's screen: play.js makes the whole screen bigger or smaller to fit its room. */
.sv-play-stage {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  border-radius: 26px;
  background: var(--bezel);
  box-shadow: 0 0 0 12px var(--bezel), 0 2px 4px rgba(19, 36, 59, .08), 0 34px 64px -30px rgba(19, 36, 59, .6);
}
.sv-play-stage::before { content: ""; display: block; padding-bottom: calc(133.333% + 88px); }
/* The frame's rim, drawn again over the game. Nothing that holds the game is cut to round corners: a browser can
   leave the corners of a scaled frame cut that way unpainted. The game's box is square, and this rim, wide enough to
   reach each square corner (12px round a 26px corner), is what rounds it. The picture is cut round by its own link. */
.sv-play-stage::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  border-radius: 26px;
  box-shadow: 0 0 0 12px var(--bezel);
  pointer-events: none;
}
.sv-play-poster { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: block; overflow: hidden; border-radius: 26px; color: var(--pine); text-decoration: none; }
.sv-play-poster picture { position: absolute; top: 0; right: 0; bottom: 88px; left: 0; display: block; overflow: hidden; background: #f4efe6; }
.sv-play-poster img { display: block; width: 100%; height: 100%; max-width: none; -o-object-fit: cover; object-fit: cover; -o-object-position: top center; object-position: top center; }
/* The picture's foot slips into shade, so a line of the game cut by the strip does not end on a hard edge. */
.sv-play-poster picture::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 40px;
  background: linear-gradient(to bottom, rgba(29, 43, 42, 0), rgba(29, 43, 42, .34));
}
.sv-play-poster-go, .sv-play-wait {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 11px;
  align-items: center;
  min-height: 66px;
  border-radius: 999px;
  font: 600 1.5rem/1 var(--sans);
  white-space: nowrap;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
}
.sv-play-poster-go {
  display: inline-flex;
  padding: 0 2.4rem 0 1.9rem;
  background: #fffdf8;
  color: var(--pine);
  box-shadow: inset 0 -2px 0 rgba(19, 36, 59, .1);
  -webkit-transition: background-color .15s ease, box-shadow .15s ease;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.sv-play-poster-go svg { flex: none; width: 1.6rem; height: 1.6rem; margin-right: .6rem; }
.sv-play-poster:hover .sv-play-poster-go { background: #fff; box-shadow: inset 0 -2px 0 rgba(19, 36, 59, .1), 0 0 0 5px rgba(255, 253, 248, .22); }
.sv-play-poster:focus-visible { outline: none; }
.sv-play-poster:focus-visible .sv-play-poster-go { box-shadow: 0 0 0 3px var(--bezel), 0 0 0 7px var(--sun); }
/* The room the phone sits in, the phone's screen at the size play.js gives it, and inside it the app at 390 by 844,
   scaled from its top left corner. */
.sv-play-room { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 2; overflow: hidden; background: #f4efe6; }
.sv-play-phone { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; background: #f4efe6; }
.sv-play-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 390px;
  height: 844px;
  border: 0;
  background: #f4efe6;
  -webkit-transform-origin: 0 0;
  transform-origin: 0 0;
}
.sv-play-stage.is-loading .sv-play-room { opacity: 0; }
/* While the game opens, the strip says so where Play was. */
.sv-play-wait { display: none; z-index: 3; padding: 0 1rem; color: #fffdf8; }
.sv-play-stage.is-loading .sv-play-wait { display: inline-flex; }
.sv-play-stage.is-loading .sv-play-poster-go { visibility: hidden; }

/* The strip above the game when it fills the screen: Close, the game's name, and the way to the app. */
.sv-play-bar { display: none; }
.sv-play-bar button, .sv-play-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-height: 48px;
  padding: 0 1.1rem;
  border: 0;
  border-radius: 14px;
  font: 600 1.125rem/1 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.sv-play-close { background: rgba(255, 253, 248, .14); color: #fffdf8; }
.sv-play-close:hover { background: rgba(255, 253, 248, .24); }
.sv-play-close svg { width: 1.1rem; height: 1.1rem; margin-right: .5rem; }
.sv-play-bar a.sv-play-get, .sv-play-bar a.sv-play-get:hover { background: #fffdf8; color: var(--ink); }
.sv-play-bar button:focus-visible, .sv-play-bar a:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.sv-play-bar-name { flex: 1 1 auto; min-width: 0; margin: 0 .75rem; overflow: hidden; color: #fffdf8; font: 400 1.25rem/1.2 var(--serif); text-align: center; text-overflow: ellipsis; white-space: nowrap; }

/* The game across the whole screen (every phone, and Full screen on a wider one). */
.sv-play-stage.is-full {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  border-radius: 0;
  background: var(--ink);
  box-shadow: none;
}
@supports (height: 100dvh) { .sv-play-stage.is-full { height: 100dvh; } }
.sv-play-stage.is-full::before, .sv-play-stage.is-full::after { display: none; }
.sv-play-stage.is-full .sv-play-poster { border-radius: 0; }
.sv-play-stage.is-full .sv-play-bar {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  width: 100%;
  height: 60px;
  padding: 0 8px;
  background: var(--ink);
}
.sv-play-stage.is-full .sv-play-poster { top: 60px; }
/* The phone stands in the middle of the dark, under the strip. Where the window is too small even for the smallest
   phone play.js allows, the room scrolls. */
.sv-play-stage.is-full .sv-play-room { top: 60px; overflow: auto; -webkit-overflow-scrolling: touch; background: var(--ink); }
/* The phone's round corners are painted over its square box, in the colour of the dark around it. */
.sv-play-stage.is-full .sv-play-phone::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  border-radius: 22px;
  box-shadow: inset 0 0 0 1px rgba(255, 253, 248, .16), 0 0 0 22px var(--ink);
  pointer-events: none;
}
html.sv-play-lock, html.sv-play-lock body { overflow: hidden; }

@media (max-width: 419px) {
  .sv-play-bar-name { display: none; }
  .sv-play-stage.is-full .sv-play-bar { justify-content: space-between; }
}
/* From 700px the strip under the picture is a little taller. */
@media (min-width: 700px) {
  .sv-play-stage::before { padding-bottom: calc(133.333% + 96px); }
  .sv-play-poster picture { bottom: 96px; }
  .sv-play-poster-go, .sv-play-wait { bottom: 15px; }
  /* Across a wide window the phone keeps a little air under it. A phone's window gives it every pixel. */
  .sv-play-stage.is-full .sv-play-room { bottom: 12px; }
}
/* The same two numbers as play.js: a window this wide and this tall has room for the game beside the words, in a
   frame as tall as the window allows. */
@media (min-width: 700px) and (min-height: 740px) {
  .sv-play-stage {
    width: 296px;
    width: calc(min(100vh - 9.5rem, 844px) * .462085);
    height: 640px;
    height: min(calc(100vh - 9.5rem), 844px);
  }
  .sv-play-stage::before { display: none; }
  .sv-play-stage.is-full { width: 100%; height: 100%; }
}
/* A wide window shorter than that (a small laptop, a phone on its side): the picture is as tall as the window
   allows, and Play opens the game across the window, as it does on a phone, so the game has all the height there is. */
@media (min-width: 700px) and (max-height: 739px) {
  .sv-play-stage { max-width: 320px; max-width: max(320px, calc((100vh - 9.5rem - 96px) * .75)); }
  .sv-play-stage.is-full { max-width: none; }
}
@media (min-width: 900px) {
  .sv-play-hero-inner {
    grid-template-columns: minmax(0, 1fr) 390px;
    grid-column-gap: 3.5rem;
    align-items: start;
    padding-top: 2.5rem;
  }
  .sv-play-words { padding-top: 1rem; }
}

/* ---------- The page under the game ---------- */
/* How to play: one numbered card for each step. */
.sv-guide ol.sv-play-steps { margin-top: 1.5rem; padding-left: 0; list-style: none; counter-reset: sv-play-step; }
.sv-guide .sv-play-steps li {
  position: relative;
  min-height: 5rem;
  padding: 1.35rem 1.4rem 1.35rem 5.1rem;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow-card);
  counter-increment: sv-play-step;
}
.sv-guide .sv-play-steps li + li { margin-top: 1rem; }
.sv-play-steps li::before {
  content: counter(sv-play-step);
  position: absolute;
  left: 1.2rem;
  top: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 14px;
  background: var(--butter);
  color: var(--ink);
  font: 400 1.75rem/1 var(--serif);
}
.sv-play-paper { margin-top: 1.5rem; }

/* The cards: every game on the hub (three shelves of six), and four more under each game. The picture is a square
   of the game's own screen. Two across on a phone; from 640px three across on the hub and four under a game. */
.sv-guide ul.sv-play-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-column-gap: 1rem;
  grid-row-gap: 1rem;
  margin-top: 1.5rem;
  padding-left: 0;
  list-style: none;
}
.sv-guide .sv-play-card {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow-card);
  -webkit-transition: box-shadow .2s ease;
  transition: box-shadow .2s ease;
}
.sv-guide .sv-play-card + .sv-play-card { margin-top: 0; }
.sv-play-card:hover { box-shadow: var(--shadow-card-hover); }
.sv-play-card-art { position: relative; flex: none; overflow: hidden; background: var(--sand); }
.sv-play-card-art::before { content: ""; display: block; padding-bottom: 100%; }
.sv-play-card-art img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; max-width: none; -o-object-fit: cover; object-fit: cover; }
.sv-play-card-body { display: flex; flex: 1 1 auto; flex-direction: column; padding: 1rem 1rem 1.2rem; }
.sv-guide .sv-play-card h3 { font: 400 1.375rem/1.2 var(--serif); letter-spacing: -.01em; font-variation-settings: "opsz" 36; }
.sv-play-card h3 a { color: var(--ink); text-decoration: none; overflow-wrap: normal; }
.sv-play-card h3 a::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1; border-radius: 22px; }
.sv-play-card:hover h3 a { color: var(--pine); text-decoration: underline; text-decoration-thickness: 1px; }
.sv-play-card h3 a:focus-visible { outline: none; }
.sv-play-card h3 a:focus-visible::after { outline: 3px solid var(--ring); outline-offset: -3px; }
.sv-guide .sv-play-card h3 + p { margin-top: .45rem; color: var(--ink-soft); font-size: 1.125rem; line-height: 1.45; }
.sv-play-group + .sv-play-group { margin-top: 3.5rem; }
.sv-play-group-line { max-width: var(--measure); margin-top: .75rem; color: var(--ink-soft); }
.sv-play-all { margin-top: 1.75rem; }
.sv-play-all a { display: inline-block; min-height: 48px; padding: .65rem 0; font-weight: 600; }
@media (min-width: 640px) {
  .sv-guide ul.sv-play-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-column-gap: 1.25rem; grid-row-gap: 1.25rem; }
  .sv-guide ul.sv-play-cards-more { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-column-gap: 1rem; }
  .sv-play-card-body { padding: 1.15rem 1.25rem 1.4rem; }
  .sv-play-cards-more .sv-play-card-body { padding: .9rem 1rem 1.1rem; }
}

/* The hub's opening: the words, and from 900px three of the games' screens beside them. On a phone the cards
   underneath are the pictures. */
.sv-play-hub-hero .sv-play-lead { max-width: 40rem; }
.sv-play-fan { display: none; }
.sv-play-fan .sv-phone { width: 31%; max-width: 13.5rem; }
.sv-play-fan .sv-phone + .sv-phone { margin-left: 3.5%; margin-top: 2.25rem; }
.sv-play-fan .sv-phone:nth-child(3) { margin-top: 0; }
@media (min-width: 900px) {
  .sv-play-hub-hero .sv-play-hero-inner { grid-template-columns: minmax(0, 1fr) 44%; }
  .sv-play-fan { display: flex; align-items: flex-start; justify-content: center; margin-top: 1.5rem; }
}

/* ---------- The way to the stores (PLAY-FUNNEL; the block itself is /site/get-app.css) ---------- */
/* Under the game, the app's card: its words beside the app's two screens, then the two apps' cards with their store
   buttons, the full width of the card, as on a guide. On a phone the two cards come straight after the heading and
   the two phone pictures, which guides.css puts first, go under the words, so the store button is on the first screen
   of the card. */
.sv-play .sv-app { display: flex; flex-direction: column; }
.sv-play .sv-app-phones { order: 2; margin: 2rem 0 0; }
.sv-play .sv-app-text .sv-app-marks { margin-top: 1.25rem; color: var(--ink-soft); }
@media (max-width: 899px) {
  .sv-play .sv-app-text { display: flex; flex-direction: column; }
  .sv-play .sv-app-text > h2 { order: -2; }
  .sv-play .sv-app-text > .sv-getapp { order: -1; margin: 1.25rem 0 1.75rem; }
  .sv-play .sv-app-text > .sv-app-marks { margin-top: 1.15rem; }
}
@media (min-width: 900px) {
  .sv-play .sv-app { display: flow-root; }
  .sv-play .sv-app-phones { margin: .25rem 0 1.75rem 2rem; }
}
/* Beside the Play button on a phone: the phone's own store, the same height as the button. */
.sv-play-actions .sv-getapp-phone img { height: 64px; }
@media (max-width: 419px) {
  .sv-play-actions .sv-getapp-phone img { height: 60px; }
}

/* Print: the words and the steps, without the game's frame or buttons. */
@media print {
  .sv-play-stage, .sv-play-actions, .sv-play-note, .sv-play-fan, .sv-play-card-art { display: none !important; }
}
