/* Troy landing: "A day at USC" (#demos).
   Two looks, one markup:
   1. Static (no JavaScript, reduced motion): five stops stacked as cards, each with its time, setup line,
      finished conversation (both sides) and chip. Everything below up to "The pinned scene" is that look.
   2. Pinned (day.js adds .day-on to <html>): the wrapper is five screens tall and the stage sticks
      to the screen while the day plays by itself. On stage: one phone (the person asking) on the left, the
      connection picture beside it, and the other side as a small notification card that pops out of their circle. day.js sets data-spot on .day-panel
      (intro, phone, map, card, chip): that one thing lifts a touch (scale 1.02). Nothing that has been shown in
      the stop is dimmed or blurred; during the intro the stage is empty except for the time and the setup line.
   Only opacity and transform move. */

.day-panel { box-shadow: var(--shadow-soft); }
.day-title { max-width: 26ch; margin: 0 auto; }

/* Only the pinned scene uses these. */
.day-clock, .day-nav, .day-shell, .day-idle, .day-intro, .day-cardbox { display: none; }

.day-stop { margin-top: 88px; }
.day-shell + .day-stop { margin-top: 56px; }
.day-time {
  font-family: var(--font-serif);
  font-weight: var(--display-weight, 400);
  font-size: var(--fs-lead);
  line-height: 1.1;
}
.day-setup { margin-top: 6px; font-weight: 500; }

.day .stage { flex-wrap: wrap; margin-top: 28px; }
.day .map-figure { flex: 0 1 380px; }
.day-under { margin-top: 28px; }
.day-note {
  max-width: 34em;
  margin: 0 auto;
  font-size: var(--fs-small);
  color: var(--stone);
  text-wrap: balance;
}
.day .pair-foot { margin-top: 16px; }

/* Who the two new phones belong to (phone.css has the others). */
.convo[data-convo="food"] .phone[data-phone="right"]::after { content: "A student nearby"; }
.convo[data-convo="rides"] .phone[data-phone="left"]::after { content: "A student"; }
.convo[data-convo="rides"] .phone[data-phone="right"]::after { content: "Another student"; }

/* Reported, On it, Fixed. Static look: one row under the phones (the card around it is not shown). */
.day-cardbox-repair { display: block; margin-top: 28px; }
html:not(.day-on) .day-cardbox-repair .day-card > :not(.repair-steps) { display: none; }
.day .repair-steps {
  position: static;
  width: auto;
  grid-auto-flow: column;
  justify-content: center;
  gap: 34px;
}
.day .repair-steps li { gap: 8px; min-height: 24px; }
.day .repair-steps li::before { width: 20px; height: 20px; }
.day .repair-steps li + li::after {
  left: -26px;
  bottom: 50%;
  width: 18px;
  height: 1px;
}

/* ---------- The pinned scene ---------- */

/* The only snap point on the page is the top of the scene, and only when a scroll ends near it. */
html.day-on { scroll-snap-type: y proximity; }
/* Not on touch screens or narrow ones: there the browser snaps again whenever the scene's content changes, which
   pulled the page back up to the scene each time the day moved on while the visitor was reading further down. */
@media (hover: none), (pointer: coarse), (max-width: 899px) {
  html.day-on { scroll-snap-type: none; }
}

html.day-on main > section#demos {
  height: 500vh;
  height: 500svh;                 /* one screen of stage plus four of scrolling: the day plays by itself, the first
                                     stop holds for a screen, and each skip (day.js) takes most of a screen */
  scroll-snap-align: start;       /* a scroll that ends just short of the scene settles with the stage filling
                                     the screen; inside the scene (taller than the screen) scrolling stays free */
  padding-left: clamp(16px, 3vw, 120px);
  padding-right: clamp(16px, 3vw, 120px);
}
html.day-on .day-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  padding: clamp(10px, 2.2vh, 22px) 0;
}
html.day-on .day-panel {
  --pw: clamp(250px, 24vw, 340px);
  --ph: min(calc(var(--pw) * 2.07), calc(100vh - 170px));
  position: relative;
  display: grid;
  grid-template-columns: var(--pw) minmax(0, 500px);
  justify-content: center;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  column-gap: clamp(28px, 7vw, 112px);
  row-gap: clamp(4px, 1vh, 10px);
  width: 100%;
  max-width: 1280px;
  height: 100%;
  padding: clamp(14px, 2.4vh, 26px) clamp(16px, 3vw, 44px);
  background: rgba(var(--paper-rgb), 0.97);   /* nearly solid, so what is on stage has contrast */
  overflow: hidden;
}
@supports (height: 100svh) {
  html.day-on .day-panel { --ph: min(calc(var(--pw) * 2.07), calc(100svh - 170px)); }
}

/* The heading and each stop's own time stay for screen readers; the clock shows the time. */
html.day-on .day-title,
html.day-on .day-time {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The headline, top center: the time, and under it the stop's setup line (.day-setup below), in the same face */
html.day-on .day-clock {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: center;
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 0;
  font-family: var(--font-serif);
  font-weight: var(--display-weight, 400);
  font-size: clamp(22px, 3vh, 28px);
  line-height: 1;
  letter-spacing: var(--display-tracking, -0.01em);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  transition: opacity 0.4s ease 0.2s;
}
.day-clock-time { text-align: right; }
.day-clock-ampm { font-size: 0.7em; letter-spacing: 0; }

/* Five tiny numerals and the next arrow, in the top corner */
html.day-on .day-nav {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  align-self: center;
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: -7px;
}
.day-marks { display: flex; align-items: center; }
.day-mark,
.day-next,
.day-pause,
.day-again {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 50%;
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--stone);
  opacity: 0.55;
  cursor: pointer;
}
.day-mark::after,
.day-next::after,
.day-pause::after,
.day-again::after { content: ""; position: absolute; inset: -6px -2px; }   /* tap area */
.day-mark.is-past { opacity: 0.8; }
.day-mark.is-current { color: var(--ink); opacity: 1; }
.day-mark.is-current::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--gold);
}
.day-next { margin-left: 2px; }
.day-next:hover, .day-mark:hover, .day-pause:hover, .day-again:hover { opacity: 1; }
.day-again[hidden] { display: none; }
.day-again { opacity: 0.9; color: var(--ink); }
.day-next svg,
.day-pause svg,
.day-again svg,
.day-idle svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The big time and setup line: alone on the clean panel for a beat (the stage is empty behind it), then it lifts
   toward the headline at the top and the stage comes in. day.js makes this element and fills it from the current stop. */
html.day-on .day-intro {
  grid-area: 1 / 1 / -1 / -1;
  place-self: center;
  z-index: 6;
  display: block;
  max-width: min(92%, 22em);
  text-align: center;
  font-family: var(--font-serif);
  font-weight: var(--display-weight, 400);
  letter-spacing: var(--display-tracking, -0.01em);
  font-size: clamp(1.5rem, 4.2vh, 2.375rem);
  line-height: 1.12;
  text-wrap: balance;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-30vh) scale(0.6);
  transition: opacity 0.3s ease, transform 0.6s cubic-bezier(0.5, 0, 0.3, 1);
}
.day-intro-time {
  display: block;
  margin-bottom: 0.12em;
  font-size: 2.5em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.day-intro-time small { margin-left: 0.14em; font-size: 0.42em; color: var(--stone); letter-spacing: 0; }
.day-intro-line { display: block; }
html.day-on .day-panel[data-spot="intro"] .day-intro {
  opacity: 1;
  transform: none;
  transition: opacity 0.3s ease 0.12s, transform 0s;
}

/* The one phone frame stays put. Each stop's phone sits on top of it with clear glass, so only what is on the
   screen cross-fades. */
html.day-on .day-shell {
  display: block;
  position: relative;
  grid-column: 1;
  grid-row: 3 / -1;
  align-self: center;
  justify-self: center;
  width: var(--pw);
  height: var(--ph);
  margin-top: 30px;               /* room for the label above the phone */
  background: var(--ink);
  border-radius: 48px;
  box-shadow: var(--shadow-phone);
}
html.day-on .day-shell::before {
  content: "";
  position: absolute;
  inset: 10px;
  background: var(--white);
  border-radius: 38px;
}

/* The five stops share the panel's grid and lie on top of one another. */
html.day-on .day-stop {
  grid-area: 1 / 1 / -1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  grid-template-rows: subgrid;
  min-width: 0;
  min-height: 0;
  margin: 0;
  pointer-events: none;
}
html.day-on .day-stop-head,
html.day-on .day-stop .stage,
html.day-on .day-stop .convo,
html.day-on .day-under { display: contents; }
html.day-on .day-stop .convo::before { display: none; }

/* The setup line: the stage's headline for the whole stop, under the time */
html.day-on .day-setup {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: center;
  justify-self: center;
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vh, 28px);
  font-weight: var(--display-weight, 400);
  line-height: 1.15;
  letter-spacing: var(--display-tracking, -0.01em);
  text-align: center;
  text-wrap: balance;
  color: var(--ink);
}

html.day-on .day-stop .phone {
  grid-column: 1;
  grid-row: 3 / -1;
  align-self: center;
  justify-self: center;
  width: var(--pw);
  height: var(--ph);
  margin-top: 30px;
  background: transparent;
  box-shadow: none;
}
html.day-on .day-stop .phone-screen { background: transparent; }
/* The other side has no phone here: it is the notification card on the map. chat.js still plays into it. */
html.day-on .day-stop:not([data-main="right"]) .phone[data-phone="right"],
html.day-on .day-stop[data-main="right"] .phone[data-phone="left"] { visibility: hidden; }

/* The connection picture: 4 by 3, centered in its half of the stage, as large as its cell allows up to 500px wide
   (its circles are then 80px across and its labels 17px). */
html.day-on .map-figure,
html.day-on .day-cardbox {
  grid-column: 2;
  grid-row: 3;
  container-type: size;
  display: grid;
  place-items: center;
  width: auto;
  max-width: none;
  min-width: 0;
  min-height: 0;
  margin: 0;
}
html.day-on #food-map,
html.day-on .day-cardsq {
  width: min(100cqw, 133.33cqh, 500px);
  height: min(75cqw, 100cqh, 375px);
  aspect-ratio: auto;
}
html.day-on #food-map .map-place { fill: var(--ink); }
html.day-on #food-map { background: none; border: 0; border-radius: 0; overflow: visible; }

/* The notification card. .day-cardsq lies exactly over the picture, so the card is placed in its coordinates
   with one corner just under the other person's circle, and grows out of that corner. It may run past the foot
   of the picture into the white space below. */
html.day-on .day-cardbox { z-index: 4; pointer-events: none; }
html.day-on .day-cardsq { position: relative; }
html.day-on .day-card {
  position: absolute;
  width: clamp(230px, 56%, 300px);
  padding: 12px 14px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-phone);
  text-align: left;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
html.day-on .day-card[data-card="lost-found"],
html.day-on .day-card[data-card="broken"] { right: 4%; top: 56%; transform-origin: 80% 0; }
html.day-on .day-card[data-card="concern"] { right: 4%; top: 48%; transform-origin: 80% 0; }
/* Free food and rides: the picture fills its lower half (the ring, the three lines), so the card sits under the
   picture, joined to its circle by a short line, and the picture and card move up a little into the room above. */
html.day-on .day-card[data-card="food"] { right: 30%; top: 88%; transform-origin: 90% 0; }
html.day-on .day-card[data-card="rides"] { left: 4%; top: 72%; transform-origin: 20% 0; }
html.day-on[data-day-stop="2"] #food-map,
html.day-on[data-day-stop="4"] #food-map,
html.day-on :is(#food, #rides) .day-cardsq { transform: translateY(max((100% - 100cqh) / 2, -56px)); }
html.day-on :is(#food, #rides) .day-cardsq::before {
  content: "";
  position: absolute;
  width: 2px;
  margin-left: -1px;
  border-radius: 1px;
  background: var(--stone);
  opacity: 0;
  transition: opacity 0.3s ease;
}
html.day-on #food .day-cardsq::before { left: 64.5%; top: 75%; height: 13%; }
html.day-on #rides .day-cardsq::before { left: 15%; top: 67%; height: 5%; }
html.day-on :is(#food, #rides).is-current .day-cardsq:has(.day-card.is-out)::before { opacity: 0.55; }
/* Once it is out it stays, at full strength. Its moment is a small lift. */
html.day-on .day-stop.is-current .day-card.is-out { opacity: 1; transform: none; }
html.day-on .day-panel[data-spot="card"] .day-stop.is-current .day-card.is-out { transform: scale(1.02); }

.day-card-who {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}
.day-card-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--line);
}
.day-card-avatar svg { width: 18px; height: 18px; fill: var(--stone); }
.day-card-msgs { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.day-card-b {
  position: relative;
  display: none;
  max-width: 94%;
  margin: 0;
  padding: 6px 10px;
  background: var(--bubble-gray);
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.3;
  color: var(--ink);
}
.day-card-b.is-me { align-self: flex-end; background: var(--imessage-blue); color: var(--white); }
.day-card-b.is-photo { width: 96px; height: 72px; padding: 0; overflow: hidden; background: var(--line); }
.day-card-b.is-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.day-card-b.is-on { display: block; animation: day-card-in 0.3s ease-out both; }
.day-card-tap {
  position: absolute;
  top: -11px;
  right: -8px;
  display: none;
  padding: 2px 5px;
  background: var(--bubble-gray);
  border: 2px solid var(--paper);
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.2;
}
.day-card-tap.is-on { display: block; animation: day-card-in 0.3s ease-out both; }
@keyframes day-card-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Reported, On it, Fixed: three small marks on the technician's card */
html.day-on .day-cardbox-repair { margin-top: 0; }
html.day-on .day .repair-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 4px 12px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}
html.day-on .day .repair-steps li { gap: 5px; min-height: 0; font-size: 13px; color: var(--ink); }
html.day-on .day .repair-steps li::before { width: 10px; height: 10px; }
html.day-on .day .repair-steps li + li::after { display: none; }

/* Under the picture: the chip, and for free food the one line about who gets the text. They share the place. */
html.day-on .day-extra { display: none; }
html.day-on #food .day-extra {
  grid-column: 2;
  grid-row: 4;
  display: grid;
  align-items: center;
  min-height: 46px;
}
html.day-on .day-stop .pair-foot {
  grid-column: 2;
  grid-row: 4;
  flex-direction: row;
  flex-wrap: nowrap;
  min-height: 46px;
  margin: 0;
}
html.day-on .day-stop .replay {
  flex: none;
  width: 32px;
  height: 32px;
  background: none;
  border-color: transparent;
  color: var(--stone);
}
html.day-on .day-stop .replay svg { width: 17px; height: 17px; }

/* Cross-fade between stops: the setup line, the screen, the label above the phone, the chip.
   Everything of a stop that is not the current one is hidden, with or without the script's later attributes. */
html.day-on .day-setup,
html.day-on .day-stop .phone-screen,
html.day-on .day-stop .phone::after,
html.day-on .day-stop .stage-who,
html.day-on .day-extra,
html.day-on .day-stop .pair-foot {
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.45s ease;
}
html.day-on .day-stop.is-current .day-setup { opacity: 1; transition-delay: 0.2s; }
html.day-on .day-stop.is-current .phone-screen,
html.day-on .day-stop.is-current .phone::after,
html.day-on .day-stop.is-current .stage-who { opacity: 1; }
html.day-on .day-stop.is-current .pair-foot { opacity: 1; pointer-events: auto; }
/* The free food line shows while the picture has its moment; the chip takes the same place afterwards. */
html.day-on .day-panel[data-spot="map"] #food.is-current .day-extra { opacity: 1; }
html.day-on .day-panel[data-spot="map"] #food.is-current .pair-foot { opacity: 0; }

/* The spotlight. Whatever has the moment lifts a touch; nothing else is dimmed and nothing is blurred. */
html.day-on .day-shell,
html.day-on .day-stop .phone,
html.day-on .map-figure,
html.day-on .day-cardbox { transition: opacity 0.4s ease 0.2s, transform 0.45s ease; }
html.day-on .day-panel[data-spot="phone"] :is(.day-shell, .day-stop .phone),
html.day-on .day-panel[data-spot="map"] .map-figure,
html.day-on .day-panel[data-spot="chip"] .day-stop.is-current .pair-foot { transform: scale(1.02); }

/* The intro: the stage is empty, so only the large time and line show on the panel. It clears at once (a cut, so
   nothing of the stop before is ever seen through the line, and nothing shows on first load), the large line
   comes in just after, and when the line lifts away the stage fades in (the 0.2s delays above). */
html.day-on .day-panel[data-spot="intro"] :is(.day-clock, .day-shell, .map-figure, .day-cardbox, .day-idle),
html.day-on .day-panel[data-spot="intro"] .day-stop .phone,
html.day-on .day-panel[data-spot="intro"] .day-stop :is(.day-setup, .pair-foot, .day-extra, .stage-who) {
  opacity: 0;
  transition: none;
}

/* The nudge: a small quiet pill at the foot of the picture, once the whole day has played. */
html.day-on .day-idle {
  grid-column: 2;
  grid-row: 3;
  align-self: end;
  justify-self: center;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0 0 10px;
  padding: 5px 12px 5px 9px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--stone);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
html.day-on .day-idle.is-on { opacity: 1; transform: none; }

/* ---------- Narrow screens: the picture on top with the card over it, the one phone below ---------- */

@media (max-width: 899px) {
  /* The panel keeps a 16px gutter, like the other paper panels: it never touches the sides of the screen. */
  html.day-on main > section#demos { padding-left: 16px; padding-right: 16px; }
  html.day-on .day-stage { padding: 8px 0; }
  html.day-on .day-panel {
    --pw: min(100%, 300px);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto min(30vh, calc((100vw - 60px) * 0.75)) minmax(0, 1fr) auto;
    row-gap: 6px;
    padding: 10px 14px 8px;
    border-radius: 24px;
  }
  @supports (height: 100svh) {
    html.day-on .day-panel { grid-template-rows: auto auto min(30svh, calc((100vw - 60px) * 0.75)) minmax(0, 1fr) auto; }
  }
  html.day-on .day-clock { grid-column: 1; grid-row: 1; justify-self: start; font-size: 20px; align-self: center; }
  html.day-on .day-nav { grid-column: 1; grid-row: 1; justify-self: end; align-self: center; margin: 0 -6px 0 0; }
  html.day-on .day-setup { grid-column: 1; grid-row: 2; font-size: 19px; }
  html.day-on .map-figure,
  html.day-on .day-cardbox { grid-column: 1; grid-row: 3; }
  html.day-on .day-intro { transform: translateY(-36vh) scale(0.6); }
  html.day-on #food .day-extra { grid-column: 1; grid-row: 5; min-height: 38px; }
  html.day-on .day-note { font-size: 12.5px; line-height: 1.35; }
  html.day-on .day-stop .pair-foot { grid-column: 1; grid-row: 5; gap: 4px; min-height: 38px; }
  html.day-on .day-idle { grid-column: 1; grid-row: 3; margin-bottom: 6px; }
  html.day-on .day-stop .chip { min-height: 36px; padding: 5px 14px 5px 12px; font-size: 13px; }

  /* Little room here, so the card only shows while it is its moment, as a wide banner in the gap between the
     picture and the phone: its foot sits just above the phone, and for that moment the picture steps up (and, where
     it fills its box, gets smaller) so the card covers none of its circles, lines or labels. */
  html.day-on .day-stop .day-card[data-card] {
    left: 0;
    right: 0;
    top: auto;
    bottom: 10px;
    width: auto;
    padding: 8px 10px 10px;
    border-radius: 18px;
    transform-origin: 50% 100%;
  }
  html.day-on :is(#food, #rides) .day-cardsq::before { display: none; }
  html.day-on .day-panel:not([data-spot="card"]) .day-stop.is-current .day-card.is-out { opacity: 0; }
  /* The picture makes room first, then the card comes in; the card is gone again before the picture is back. */
  html.day-on .day-stop .day-card[data-card] { transition-duration: 0.15s, 0.45s; }
  html.day-on .day-panel[data-spot="card"] .day-stop.is-current .day-card.is-out {
    transition-duration: 0.3s, 0.45s;
    transition-delay: 0.3s;
  }
  html.day-on .map-figure { transform-origin: 50% 0; }
  html.day-on[data-day-stop="1"] .day-panel[data-spot="card"] .map-figure { transform: translateY(-8%); }
  html.day-on[data-day-stop="3"] .day-panel[data-spot="card"] .map-figure { transform: translateY(-23%); }
  html.day-on[data-day-stop="2"] .day-panel[data-spot="card"] .map-figure { transform: translateY(-4%) scale(0.53); }
  html.day-on[data-day-stop="4"] .day-panel[data-spot="card"] .map-figure { transform: translateY(-4%) scale(0.78); }
  .day-card-who { margin-bottom: 6px; font-size: 12px; }
  .day-card-avatar { width: 22px; height: 22px; }
  .day-card-avatar svg { width: 15px; height: 15px; }
  /* Short replies sit beside the line they answer, so the banner stays low. */
  .day-card-msgs { flex-flow: row wrap; justify-content: flex-end; align-items: flex-end; }
  .day-card-b { max-width: 80%; font-size: 12px; }
  .day-card-b:not(.is-me) { margin-right: auto; }
  .day-card-b.is-photo { width: 76px; height: 57px; }

  /* The phone, upright, as tall as the room left for it. */
  html.day-on .day-shell,
  html.day-on .day-stop .phone[data-phone] {
    grid-column: 1;
    grid-row: 4;
    align-self: stretch;
    width: var(--pw);
    height: auto;
    min-height: 0;
    margin-top: 0;
    padding: 7px;
    border-radius: 34px;
  }
  html.day-on .day-shell::before { inset: 7px; border-radius: 27px; }
  html.day-on .day-stop .phone::after { display: none; }
  html.day-on .day-stop .phone-screen { border-radius: 27px; font-size: 13px; }
  html.day-on .day-stop .phone-screen::before { display: none; }       /* no room for the island */
  html.day-on .day-stop .msg-header { flex-direction: row; justify-content: center; gap: 6px; padding: 7px 10px 6px; }
  html.day-on .day-stop .msg-header > .msg-avatar { width: 22px; height: 22px; }
  html.day-on .day-stop .msg-group { height: 22px; }
  html.day-on .day-stop .msg-group > * { width: 22px; height: 22px; }
  html.day-on .day-stop .msg-group > i::before { top: 3px; width: 7px; height: 7px; margin-left: -3.5px; }
  html.day-on .day-stop .msg-group > i::after { top: 11px; width: 16px; height: 12px; margin-left: -8px; }
  html.day-on .day-stop .msg-list { padding: 8px 10px 4px; }
  html.day-on .day-stop .msg-input { min-height: 28px; margin: 3px 9px 9px; }
  html.day-on .day-stop .msg-send { width: 22px; height: 22px; }
  html.day-on .day-stop .msg-send::before { top: 6px; }
  html.day-on .day-stop .msg-send::after { top: 6px; height: 10px; }
  html.day-on .day-stop .bubble.is-image { width: 116px; height: 87px; }
  html.day-on .day-stop .bubble.is-image.has-photo[data-image$="-door"] { width: 84px; height: 112px; }

  /* A small label on the top edge of the phone says whose it is. */
  html.day-on .day-stop .stage-who {
    grid-column: 1;
    grid-row: 4;
    align-self: start;
    justify-self: center;
    z-index: 3;
    display: block;
    transform: translateY(-50%);
  }
  html.day-on .stage-who span {
    display: none;
    padding: 3px 10px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ink);
    white-space: nowrap;
  }
  html.day-on .day-stop:not([data-main="right"]) .stage-who span:first-child,
  html.day-on .day-stop[data-main="right"] .stage-who span:last-child { display: block; }
}

/* Short narrow screens: the input bar gives its room to the messages. */
@media (max-width: 899px) and (max-height: 700px) {
  html.day-on .day-stop .msg-input { display: none; }
}
