/* static/play/play.css */
body.phone {
  min-height: 100dvh;
  background: var(--phone-fill);
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

/* `.page` sets its own `display`, which otherwise beats the UA stylesheet's
   `[hidden] { display: none }` — author styles always outrank UA styles,
   regardless of selector specificity. Without this, render.js's page()
   switch does nothing and every page of the phone stacks at once. */
[hidden] { display: none !important; }

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
.page.centre { align-items: center; justify-content: center; gap: 34px; }

.label.centred { text-align: center; }
.label.cyan { color: var(--cyan-pale); }

/* ---- 7A join */
.shot {
  align-self: center;
  position: relative;
  width: 180px;
  height: 180px;
  margin-top: 40px;
  transform: rotate(45deg);
  overflow: hidden;
  border: 0;
  background: #3a0508;
  box-shadow: 0 0 22px rgb(255 224 106 / 50%), inset 0 0 0 3px var(--gold);
  cursor: pointer;

  & > img { width: 100%; height: 100%; object-fit: cover; transform: rotate(-45deg) scale(1.42); }
}
.shot-hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transform: rotate(-45deg);
  background: repeating-linear-gradient(90deg, rgb(255 224 106 / 16%) 0 8px, transparent 8px 16px);
}
.shot-go { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; color: var(--gold); }
.shot:has(img:not([hidden])) .shot-hint { display: none; }

.pick-link {
  align-self: center;
  border: 0;
  background: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--cyan-pale);
  text-decoration: underline;
  cursor: pointer;
}

/* The upload the server turned down, said where the JOIN button is rather
   than as the whole-page `.fault` — the night is fine, this one photo was
   not, and JOIN comes back so they can try another. */
.join-error {
  margin: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.1em;
  /* Like `.label`: the server writes these in ordinary lower case, and the
     design's letter-spaced caps are the page's job, not the message's. */
  text-transform: uppercase;
  color: var(--rose);
}

.field { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.field .framed { padding: 12px 14px; }
.field input {
  width: 100%;
  border: 0;
  background: none;
  outline: none;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  color: #fff;
}

/* ---- 7B */
.me { display: flex; justify-content: center; margin-top: 24px; }
.selfie.big { width: 60px; height: 60px; }
.youre-in { margin: 0; text-align: center; font-size: 22px; font-weight: 800; letter-spacing: 0.03em; text-wrap: balance; }

.no-team { padding: 18px 14px; text-align: center; border: 2px dashed rgb(255 224 106 / 65%); background: rgb(0 0 0 / 18%); }
.not-yet { margin-top: 10px; font-size: 19px; font-weight: 800; letter-spacing: 0.04em; color: rgb(255 255 255 / 55%); }

.team-plate { padding: 12px; text-align: center; background: var(--card); font-size: 21px; font-weight: 800; letter-spacing: 0.03em; }

.mates { display: flex; flex-direction: column; gap: 8px; }
.mate {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgb(111 196 238 / 70%);
  background: rgb(0 0 0 / 14%);

  &.happy { border: 2px solid var(--gold); }
  &.offline { opacity: 0.55; }

  & .selfie { width: 24px; height: 24px; flex: 0 0 auto; margin: 5px; }
  & .who { font-size: 14px; font-weight: 700; line-height: 1.15; }
  & .mark { font-family: var(--mono); font-size: 9px; letter-spacing: 0.14em; color: var(--cyan); }
  &.happy .mark { color: var(--gold); }
}

.room { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  padding: 7px 9px;
  border: 1px solid rgb(111 196 238 / 70%);
  font-size: 11px;
  font-weight: 700;

  &.me { border: 2px solid var(--gold); color: var(--gold); font-weight: 800; }
}

.others { display: flex; flex-direction: column; gap: 6px; }
.other {
  padding: 8px 10px;
  border: 1px solid rgb(111 196 238 / 60%);
  background: rgb(0 0 0 / 16%);

  & .name { font-size: 12px; font-weight: 800; }
  & .who { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; color: var(--cyan-pale); }
}

.hold { margin-top: auto; text-align: center; font-family: var(--mono); font-size: 11px; line-height: 1.7; letter-spacing: 0.14em; color: rgb(255 255 255 / 70%); }

/* ---- 7C answering */
.crumb { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: rgb(255 255 255 / 75%); }
.asked { padding: 12px; border: 1px solid rgb(255 224 106 / 50%); background: rgb(0 0 0 / 16%); font-size: 15px; font-weight: 600; line-height: 1.3; text-wrap: pretty; }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.box input {
  width: 100%;
  padding: 48px 16px;
  border: 0;
  background: none;
  outline: none;
  font-family: var(--display);
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  text-align: center;
}
/* Watching, or closed: the box is not yours to type in. */
.box.watching {
  border-color: rgb(255 224 106 / 50%);
  box-shadow: none;
}
.box input:read-only { cursor: default; }

.pens-down-note {
  margin-top: auto;
  border: 1px solid rgb(255 255 255 / 30%);
  background: rgb(255 255 255 / 14%);
  min-height: 56px;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
  color: rgb(255 255 255 / 60%);
}

#happy, #submit { margin-top: auto; }

/* ---- 7D hold */
.hold-graphic {
  width: 150px;
  height: 150px;
  transform: rotate(45deg);
  background: rgb(0 0 0 / 20%);
  box-shadow: inset 0 0 0 3px var(--gold), 0 0 30px rgb(255 180 50 / 50%);
}
.hold-title { margin: 0; text-align: center; font-size: 28px; font-weight: 800; line-height: 1.15; letter-spacing: 0.03em; text-wrap: balance; }
.hold-said { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; color: var(--gold); text-align: center; }

dialog#camera {
  border: 2px solid var(--gold);
  background: var(--ground);
  color: #fff;
  padding: 12px;

  & video { width: min(70vw, 320px); aspect-ratio: 1; object-fit: cover; background: #000; }
  & .go { margin-top: 12px; width: 100%; }
}

/* A word to the player that never moves the page under them: §5.2's editing
   lock doing its job, or a server the phone cannot reach. */
.note {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: var(--gold);
  color: var(--on-gold);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  text-wrap: balance;
}
