/* upbeep.app home page: the live demo office. Loaded after home.css, on the
   home page only. Everything inside the board is sized in em, and one em is
   ten "units" of a 780 by 650 board (560 by 600 on a phone), so the whole
   scene scales as one picture. No inline styles: positions and colours arrive
   from demo.js through the CSSOM, everything else is here. */

.demo {
  container-type: size;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

/* The box is as wide as the room allows: the board keeps its own proportions
   and the caption row keeps its own height beneath it. */
.demo-box {
  --vw: 780;
  --vh: 650;
  --foot: 84px;
  --gap: 16px;
  display: flex;
  flex: none;
  flex-direction: column;
  gap: var(--gap);
  width: min(100cqw, calc((100cqh - var(--foot) - var(--gap)) * var(--vw) / var(--vh)));
}

/* ------------------------------------------------------------------- board */

.demo-box .stage {
  position: relative;
  flex: none;
  overflow: hidden;
  container-type: inline-size;
  width: 100%;
  aspect-ratio: calc(var(--vw) / var(--vh));
  border-radius: 34px;
  background:
    radial-gradient(70% 55% at 32% 0%, rgb(255 255 255 / 0.95), transparent 70%),
    linear-gradient(180deg, #f3f6f5, #e4eae8);
  box-shadow:
    inset 0 1px 0 #ffffff,
    inset 0 0 0 1px rgb(12 19 17 / 0.06),
    0 2px 4px rgb(6 40 38 / 0.05),
    0 34px 60px -30px rgb(6 40 38 / 0.5),
    0 90px 120px -70px rgb(14 143 108 / 0.4);
}

.demo-box .stage::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: radial-gradient(rgb(12 40 36 / 0.16) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000 30%, transparent 100%);
  mask-image: radial-gradient(70% 70% at 50% 50%, #000 30%, transparent 100%);
  content: "";
  pointer-events: none;
}

/* The scene is drawn at a fixed size (one em is 10 px on a board of 780 by 650
   px) and scaled as one picture to whatever room the board has. Scaling with a
   transform, not with em, keeps every word in proportion at every size (a
   browser will not draw text below its minimum size, but it will scale it).
   tan(atan2(a, b)) is a / b as a plain number. */
.demo-box .stage-in {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--vw) * 1px);
  height: calc(var(--vh) * 1px);
  transform: scale(tan(atan2(100cqw, calc(var(--vw) * 1px))));
  transform-origin: 0 0;
  font-size: 10px;
  color: #0c1311;
}

.demo-box .demo-foot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) 32px;
  gap: 6px 16px;
  align-items: center;
  height: var(--foot);
}

.demo-box .live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 13px 7px 11px;
  border: 1px solid var(--h-line);
  border-radius: 999px;
  background: var(--h-card);
  color: var(--h-ink-2);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: -0.005em;
  white-space: nowrap;
}

.demo-box .live-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #14b083;
}

.demo-box .live-dot::after {
  position: absolute;
  inset: -4px;
  border: 1.5px solid #14b083;
  border-radius: 50%;
  content: "";
  animation: h-ping 2.4s ease-out infinite;
}

.demo-box .tools {
  display: flex;
  gap: 6px;
}

.demo-box .tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 36px;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--h-line);
  border-radius: 999px;
  background: var(--h-card);
  color: var(--h-ink-2);
  font: 700 11.5px/1 var(--font);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.demo-box .tool:hover {
  background: var(--h-card-solid);
  color: var(--h-ink);
  transform: translateY(-1px);
}

.demo-box .tool svg {
  width: 16px;
  height: 16px;
}

.demo-box .tool[aria-pressed="true"] {
  border-color: transparent;
  background: var(--h-ink);
  color: var(--h-bg);
}

.demo-box .tool-x {
  display: none;
}

.demo-box .tool[aria-pressed="true"] .tool-x {
  display: inline;
}

.demo-box .tool[data-tool="sound"] .mu {
  display: block;
}

.demo-box .tool[data-tool="sound"] .wv {
  display: none;
}

.demo-box .tool[data-tool="sound"][aria-pressed="true"] .mu {
  display: none;
}

.demo-box .tool[data-tool="sound"][aria-pressed="true"] .wv {
  display: block;
}

.demo-box .tool:focus-visible,
.demo-box .key:focus-visible,
.demo-box .slip:focus-visible,
.demo-box .sheet-btn:focus-visible,
.demo-box .w-btn:focus-visible,
.demo-box .st-send:focus-visible,
.demo-box .w-send:focus-visible {
  outline: 2px solid var(--h-accent);
  outline-offset: 2px;
}

.demo-box .dev:focus-visible {
  outline: 2px dashed var(--h-accent);
  outline-offset: 0.6em;
  border-radius: 1.6em;
}

/* ----------------------------------------------------------------- devices */

.demo-box .dev {
  position: absolute;
  z-index: 10;
  font-size: calc(var(--k, 1) * 1em);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Grow toward the board's centre, including the label above Room 1. */
.demo-box .mon {
  transition: transform 350ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 350ms ease;
}

.demo-box [data-dev="fd"] { transform-origin: 0 100%; }
.demo-box [data-dev="r1"] { transform-origin: 100% -3.7em; }
.demo-box .mon.zoom-above { z-index: 30; }
.demo-box .mon.is-zoomed { transform: scale(1.6); }
/* A receiver close-up must leave the sender's three-second Undo reachable. */
.demo-box .dev:has([data-dev-undo]:not([hidden])) { z-index: 31; }
/* While one computer zooms, the rest of the board steps back, so the zoomed one reads as the foreground. */
.demo-box .stage:has(.mon.is-zoomed) .dev:not(.is-zoomed),
.demo-box .stage:has(.mon.is-zoomed) .wires { opacity: 0.45; }
.demo-box .dev:not(.mon), .demo-box .wires { transition: opacity 350ms ease; }
.demo-box .mon.zoom-reset { transition: none; }

@media (prefers-reduced-motion: reduce) {
  .demo-box .mon.is-zoomed { transform: none; }
}

.demo-box .dev[hidden] {
  display: none;
}

.demo-box .dev button {
  cursor: pointer;
}

/* A button does not inherit its size, so everything in em inside one would be measured in 13 px, not in the device's. */
.demo-box :where(.dev button) {
  font-family: inherit;
  font-size: inherit;
}

.demo-box .mon-body,
.demo-box .ph-body,
.demo-box .w-case {
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
}

.demo-box .tag {
  position: absolute;
  z-index: 3;
  top: -3.1em;
  left: 0.2em;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  margin: 0;
  padding: 0.4em 0.95em 0.4em 0.75em;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.92);
  box-shadow:
    0 0 0 0.1em rgb(12 19 17 / 0.07),
    0 0.5em 1.2em -0.5em rgb(6 40 38 / 0.35);
  color: #0c1311;
  font-size: 1.18em;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.demo-box .tag .sq,
.demo-box .ph-chip .sq,
.demo-box .w-head .sq {
  display: inline-block;
  width: 0.72em;
  height: 0.72em;
  border-radius: 0.2em;
  background: var(--room);
  box-shadow: inset 0 0 0 0.09em rgb(0 0 0 / 0.16);
}

.demo-box .watch .tag {
  top: -6.4em;
  left: 50%;
  transform: translateX(-50%);
}

.demo-box .tag small {
  margin-left: 0.15em;
  color: #6b7672;
  font-size: 0.84em;
  font-weight: 550;
}

/* Every computer the same size, the phone at its own: a tidy two-row office. */
.demo-box [data-dev="ph"] {
  --k: 0.94;
}

/* computer */

.demo-box .mon {
  width: 30em;
}

.demo-box .mon-body {
  position: relative;
  padding: 0.75em;
  border-radius: 1.9em;
  background: linear-gradient(155deg, #454b51 0%, #1b1f22 46%, #0f1214 100%);
  box-shadow:
    inset 0 0 0 0.1em rgb(255 255 255 / 0.07),
    inset 0 0.1em 0 rgb(255 255 255 / 0.24),
    0 2.6em 3.8em -1.8em rgb(6 24 22 / 0.65),
    0 0.7em 1.4em -0.5em rgb(6 24 22 / 0.3);
}

.demo-box .mon-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  isolation: isolate;
  border-radius: 1.15em;
  background: #edf1f0;
}

.demo-box .mon-screen::after {
  position: absolute;
  z-index: 6;
  inset: 0;
  background: linear-gradient(118deg, rgb(255 255 255 / 0.2), rgb(255 255 255 / 0) 36%);
  content: "";
  pointer-events: none;
}

.demo-box .bar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.2em;
  height: 3.3em;
  padding: 0 0.3em;
  background: #2f3641;
  box-shadow: 0 0.1em 0 rgb(0 0 0 / 0.4);
}

.demo-box .bar-mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.6em;
  height: 2.3em;
  border-radius: 0.65em;
  background: rgb(255 255 255 / 0.14);
}

.demo-box .mk {
  width: 1.7em;
  height: 1.7em;
}

.demo-box .gl {
  display: block;
  width: 1.2em;
  height: 1.2em;
  flex: none;
}

.demo-box .bar-horn {
  color: rgb(255 255 255 / 0.7);
}

/* One row of pills: one that does not fit wraps out of sight instead of being sliced. */
.demo-box .pills {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.45em;
  box-sizing: border-box;
  height: 2.8em;
  min-width: 0;
  padding: 0.22em 0.1em 0;
  overflow: hidden;
}

.demo-box .bar-r {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.06em;
  margin-left: auto;
  color: rgb(255 255 255 / 0.6);
}

.demo-box .bar-em {
  display: grid;
  place-items: center;
  width: 2.3em;
  height: 2.1em;
  border-radius: 0.6em;
  background: #d93a42;
  color: #ffffff;
}

.demo-box .bar-em .gl {
  width: 1.3em;
  height: 1.3em;
}

.demo-box .wall {
  position: absolute;
  inset: 3.3em 0 0;
  background: linear-gradient(180deg, #f1f4f3, #e5eae8);
}

.demo-box .wall i {
  position: absolute;
  border-radius: 0.5em;
  background: #d5dcda;
}

.demo-box .wall i:nth-child(1) {
  top: 1.4em;
  left: 1.3em;
  width: 6.6em;
  height: 0.9em;
}

.demo-box .wall i:nth-child(2) {
  top: 3.4em;
  left: 1.3em;
  width: 4.4em;
  height: 0.7em;
  background: #dde3e1;
}

.demo-box .wall i:nth-child(3) {
  top: 5em;
  left: 1.3em;
  width: 5.6em;
  height: 0.7em;
  background: #dde3e1;
}

.demo-box .wall i:nth-child(4) {
  top: 1.2em;
  right: 1.3em;
  width: 15.5em;
  height: 9.5em;
  border-radius: 0.9em;
  background: #dfe5e3;
}

.demo-box .wall i:nth-child(5) {
  right: 1.3em;
  bottom: 1.1em;
  width: 15.5em;
  height: 1.1em;
  background: #d8dfdd;
}

.demo-box .tiles {
  position: absolute;
  z-index: 5;
  top: 3.9em;
  right: 0.8em;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5em;
  pointer-events: none;
}

.demo-box .mon-stand {
  position: relative;
  height: 1.9em;
  margin: 0 auto;
  width: 10em;
}

.demo-box .mon-stand::before {
  position: absolute;
  top: -0.1em;
  left: 50%;
  width: 2.2em;
  height: 1.4em;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #a9b1af, #eef1f0 42%, #9ea7a5);
  content: "";
}

.demo-box .mon-stand::after {
  position: absolute;
  bottom: 0.1em;
  left: 0;
  width: 100%;
  height: 0.85em;
  border-radius: 50%;
  background: linear-gradient(#f0f3f2, #b2bab8);
  box-shadow: 0 0.7em 1.3em -0.1em rgb(6 24 22 / 0.45);
  content: "";
}

.demo-box .keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 1.25fr;
  gap: 0.5em;
  margin-top: 0.3em;
  padding: 0.55em 0.55em 0.75em;
  border-radius: 1.3em;
  background: linear-gradient(#f6f8f7, #dde3e1);
  box-shadow:
    inset 0 0.1em 0 #ffffff,
    0 0 0 0.1em rgb(12 19 17 / 0.07),
    0 0.9em 1.6em -0.9em rgb(6 24 22 / 0.6);
}

.demo-box .key {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28em;
  height: 4em;
  padding: 0 0.2em;
  border: 0;
  border-radius: 0.85em;
  background: linear-gradient(#ffffff, #eff2f1);
  color: #0c1311;
  font-family: inherit;
  box-shadow:
    0 0.3em 0 #b6bfbc,
    0 0.55em 0.8em -0.25em rgb(6 24 22 / 0.3),
    inset 0 0.1em 0 #ffffff;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.demo-box .key kbd {
  color: #7c8783;
  font: 700 0.86em/1 var(--font);
  letter-spacing: 0.05em;
}

.demo-box .key span {
  font: 650 1.04em/1 var(--font);
  letter-spacing: -0.01em;
}

.demo-box .key:hover {
  transform: translateY(-0.08em);
}

.demo-box .key:active,
.demo-box .key.is-down {
  transform: translateY(0.26em);
  box-shadow:
    0 0.04em 0 #b6bfbc,
    0 0.2em 0.3em rgb(6 24 22 / 0.2),
    inset 0 0.1em 0 #ffffff;
}

.demo-box .key-em {
  background: linear-gradient(#e9505a, #d93a42);
  color: #ffffff;
  box-shadow:
    0 0.3em 0 #8b1e25,
    0 0.55em 0.8em -0.25em rgb(139 30 37 / 0.6),
    inset 0 0.1em 0 rgb(255 255 255 / 0.35);
}

.demo-box .key-em span {
  font-size: 0.86em;
}

.demo-box .key-em .gl {
  width: 1.4em;
  height: 1.4em;
}

.demo-box .key-em:active,
.demo-box .key-em.is-down {
  box-shadow: 0 0.04em 0 #8b1e25, inset 0 0.1em 0 rgb(255 255 255 / 0.35);
}

/* phone */

.demo-box .phone {
  width: 14.2em;
}

.demo-box .ph-body {
  height: 29.6em;
  padding: 0.55em;
  border-radius: 3.5em;
  background: linear-gradient(150deg, #545a60 0%, #23272b 35%, #14171a 100%);
  box-shadow:
    inset 0 0 0 0.1em rgb(255 255 255 / 0.1),
    inset 0 0.1em 0 rgb(255 255 255 / 0.3),
    0 2.6em 3.8em -1.8em rgb(6 24 22 / 0.7),
    0 0.7em 1.4em -0.5em rgb(6 24 22 / 0.35);
}

.demo-box .ph-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 0.85em 0.75em;
  overflow: hidden;
  border-radius: 3em;
  background: #1f2327;
  color: #eaf0ee;
}

.demo-box .ph-status {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 3.3em;
  padding-left: 0.7em;
  font-size: 0.95em;
}

.demo-box .ph-island {
  position: absolute;
  top: 0.95em;
  left: 50%;
  width: 4.7em;
  height: 1.4em;
  transform: translateX(-50%);
  border-radius: 1em;
  background: #000000;
}

.demo-box .ph-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.demo-box .ph-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.32em 0.75em;
  border-radius: 0.75em;
  background: var(--room);
  color: var(--ink, #0c1311);
  font-size: 0.95em;
  font-weight: 700;
}

.demo-box .ph-chip .sq {
  background: var(--ink, #0c1311);
  box-shadow: none;
  opacity: 0.45;
}

.demo-box .ph-icons {
  display: flex;
  align-items: center;
  gap: 0.5em;
  color: rgb(255 255 255 / 0.7);
}

.demo-box .ph-icons .gl {
  width: 1.5em;
  height: 1.5em;
}

.demo-box .ph-em {
  display: grid;
  place-items: center;
  width: 2.4em;
  height: 2.4em;
  border-radius: 50%;
  background: #d93a42;
  color: #ffffff;
}

.demo-box .ph-em .gl {
  width: 1.4em;
  height: 1.4em;
}

.demo-box .ph-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 1em 0 0.55em;
  font-size: 0.95em;
  font-weight: 700;
}

.demo-box .ph-title em {
  display: inline-block;
  min-width: 1.5em;
  margin-left: 0.3em;
  padding: 0.05em 0.4em;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.12);
  font-size: 0.85em;
  font-style: normal;
  text-align: center;
}

.demo-box .ph-title small {
  color: rgb(255 255 255 / 0.55);
  font-size: 0.78em;
  font-weight: 500;
}

.demo-box .ph-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.45em;
  min-height: 0;
  overflow: hidden;
}

.demo-box .ph-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.6em;
  padding: 0.55em 0.65em;
  border-radius: 1.8em;
  background: #2c3136;
}

.demo-box .st {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 0.22em;
  color: rgb(255 255 255 / 0.62);
  font-family: inherit;
}

.demo-box .st .gl,
.demo-box .st .mk {
  width: 1.3em;
  height: 1.3em;
}

.demo-box .st small {
  font-size: 0.66em;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.demo-box button.st {
  padding: 0;
  border: 0;
  background: none;
}

.demo-box .st-send {
  gap: 0.12em;
  padding: 0.3em 0.5em !important;
  border-radius: 0.8em !important;
  background: #34b088 !important;
  color: #03140f;
}

.demo-box .st-send .gl {
  width: 1.25em;
  height: 1.25em;
}

.demo-box .st-send small {
  font-size: 0.74em;
  font-weight: 700;
}

.demo-box .ph-sheet {
  position: absolute;
  z-index: 8;
  right: 0.6em;
  bottom: 5.6em;
  left: 0.6em;
  padding: 0.9em;
  border-radius: 1.6em;
  background: #ffffff;
  box-shadow: 0 1.4em 2.6em -0.8em rgb(0 0 0 / 0.6);
  color: #0c1311;
  animation: sheet-in 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

.demo-box .ph-sheet[hidden] {
  display: none;
}

.demo-box .ph-sheet p {
  margin: 0 0 0.6em 0.2em;
  color: #4b5553;
  font-size: 0.85em;
  font-weight: 650;
}

.demo-box .sheet-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  width: 100%;
  margin-top: 0.4em;
  padding: 0.7em 0.6em;
  border: 0;
  border-radius: 0.9em;
  background: #eef2f1;
  color: #0c1311;
  font: 650 0.92em/1.1 var(--font);
}

.demo-box .sheet-btn:hover {
  background: #e2e8e6;
}

.demo-box .sheet-em {
  background: #d93a42;
  color: #ffffff;
}

.demo-box .sheet-em:hover {
  background: #c5313a;
}

.demo-box .sheet-em .gl {
  width: 1.3em;
  height: 1.3em;
}

/* watch */

.demo-box .watch {
  width: 10.4em;
}

.demo-box .band {
  position: absolute;
  left: 50%;
  width: 7.2em;
  height: 6em;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #14171a, #2b3035 45%, #101315);
}

.demo-box .band-t {
  top: -4.6em;
  border-radius: 1.6em 1.6em 0.4em 0.4em;
  -webkit-mask-image: linear-gradient(#0000, #000 55%);
  mask-image: linear-gradient(#0000, #000 55%);
}

.demo-box .band-b {
  bottom: -4.6em;
  border-radius: 0.4em 0.4em 1.6em 1.6em;
  -webkit-mask-image: linear-gradient(#000 45%, #0000);
  mask-image: linear-gradient(#000 45%, #0000);
}

.demo-box .w-case {
  position: relative;
  height: 12.6em;
  padding: 0.5em;
  border-radius: 3.2em;
  background: linear-gradient(150deg, #5a6066 0%, #23272b 40%, #131618 100%);
  box-shadow:
    inset 0 0 0 0.1em rgb(255 255 255 / 0.12),
    inset 0 0.1em 0 rgb(255 255 255 / 0.3),
    0 2.2em 3.4em -1.6em rgb(6 24 22 / 0.7);
}

.demo-box .w-crown {
  position: absolute;
  top: 3.2em;
  right: -0.45em;
  width: 0.6em;
  height: 2.4em;
  border-radius: 0.3em;
  background: linear-gradient(90deg, #454b51, #1a1d20);
}

.demo-box .w-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.95em 0.75em 0.7em;
  overflow: hidden;
  border-radius: 2.75em;
  background: #000000;
  color: #f3f7f5;
}

.demo-box .w-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 0.5em;
  font-size: 0.72em;
  font-weight: 700;
}

.demo-box .w-head span {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

.demo-box .w-head em {
  font-style: normal;
  opacity: 0.6;
}

.demo-box .w-head b {
  opacity: 0.85;
}

.demo-box .w-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.4em;
  min-height: 0;
  margin-bottom: 3.3em;
  overflow: hidden;
}

.demo-box .w-strip {
  position: absolute;
  right: 0.55em;
  bottom: 0.55em;
  left: 0.55em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.28em 0.7em;
  border-radius: 2em;
  background: #2a2f34;
  color: rgb(255 255 255 / 0.7);
}

.demo-box .w-strip .gl,
.demo-box .w-strip .mk {
  width: 1.2em;
  height: 1.2em;
}

.demo-box .w-send {
  display: grid;
  place-items: center;
  width: 2.7em;
  height: 1.9em;
  padding: 0;
  border: 0;
  border-radius: 1em;
  background: #34b088;
  color: #03140f;
  box-shadow: 0 0.3em 0.6em -0.3em rgb(52 176 136 / 0.7);
}

.demo-box .w-send .gl {
  width: 1.25em;
  height: 1.25em;
  color: inherit;
}

.demo-box .w-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 0.15em;
  font-size: 0.72em;
  font-weight: 700;
}

.demo-box .w-sheet-head span {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}

.demo-box .w-x {
  display: grid;
  place-items: center;
  width: 2em;
  height: 2em;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #2a2f34;
  color: #f3f7f5;
}

.demo-box .w-x .gl {
  width: 1.1em;
  height: 1.1em;
}

.demo-box .w-sheet {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  padding: 1em 0.65em 0.7em;
  background: #000000;
  animation: sheet-in 0.25s ease;
}

.demo-box .w-sheet[hidden] {
  display: none;
}

.demo-box .w-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  flex: 1;
  padding: 0 0.4em;
  border: 0;
  border-radius: 0.9em;
  background: #2a2e32;
  color: #f3f7f5;
  font: 650 0.72em/1.1 var(--font);
}

.demo-box .w-btn:hover {
  background: #383d42;
}

.demo-box .w-em {
  background: #d93a42;
}

.demo-box .w-em .gl {
  width: 1.3em;
  height: 1.3em;
}

/* ------------------------------------------------------------- page slips */

/* a page held on the phone, which clears it after half a second (MOBILE-02) */
.demo-box .slip.is-holding::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgb(11 125 94 / 0.16);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
  animation: hold-fill 0.5s linear forwards;
}


.demo-box .slip {
  position: relative;
  display: grid;
  align-items: center;
  margin: 0;
  border: 0;
  background: #ffffff;
  color: #141b1a;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow:
    0 0 0 0.09em rgb(0 0 0 / 0.14),
    0 0.35em 0.7em -0.35em rgb(0 0 0 / 0.4);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.25s ease;
  animation: slip-in 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

.demo-box .slip:hover {
  transform: translateY(-0.12em);
}

.demo-box .s-sq {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  border-radius: 0.22em;
  background: var(--room, #999);
  box-shadow: inset 0 0 0 0.09em rgb(0 0 0 / 0.18);
}

.demo-box .s-where {
  color: #4b5553;
  font-weight: 500;
}

.demo-box .s-what {
  color: #141b1a;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.demo-box .s-how {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  color: #4b5553;
  font-variant-numeric: tabular-nums;
}

.demo-box .lf {
  display: block;
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

.demo-box .lf-t {
  fill: none;
  stroke: #dfe4e4;
  stroke-width: 3;
  stroke-linejoin: round;
}

.demo-box .lf-p {
  fill: none;
  stroke: #0b7d5e;
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-dasharray: var(--f, 0) 1;
}

.demo-box .lf-h rect {
  fill: #4b5553;
}

.demo-box .lf-b {
  display: none;
}

.demo-box .lf-b rect {
  fill: #ffffff;
}

.demo-box .lf-b .lf-f {
  fill: #b84a00;
}

.demo-box .s-ok {
  display: none;
  width: 1.1em;
  height: 1.1em;
  color: #1a7f45;
}

.demo-box .s-ok path {
  stroke-width: 3.2;
}

.demo-box .s-by {
  display: none;
}

.demo-box .age-2 .lf-t {
  stroke: #0b7d5e;
}

.demo-box .age-2 .lf-p {
  stroke: #9a6700;
}

.demo-box .age-2 .s-time {
  color: #9a6700;
  font-weight: 600;
}

.demo-box .age-3 .lf-t,
.demo-box .age-3 .lf-p {
  stroke: #b84a00;
  stroke-dasharray: none;
}

.demo-box .age-3 .lf-h {
  display: none;
}

.demo-box .age-3 .lf-b {
  display: block;
}

.demo-box .age-3 .s-time {
  color: #b84a00;
  font-weight: 700;
}

.demo-box .is-cleared .lf,
.demo-box .is-cleared .s-time {
  display: none;
}

.demo-box .is-cleared .s-ok {
  display: block;
}

.demo-box .is-cleared .s-by {
  display: inline;
  color: #1a7f45;
  font-weight: 650;
}

.demo-box .is-own {
  background: #dde3e1;
  box-shadow: 0 0 0 0.09em rgb(0 0 0 / 0.1);
}

.demo-box .is-own .s-by {
  display: inline;
  color: #4b5553;
  font-weight: 550;
}

.demo-box .is-own .lf,
.demo-box .is-own .s-time {
  display: none;
}

.demo-box .is-own.is-cleared {
  background: #ffffff;
}

.demo-box .is-emergency {
  background: #d93a42;
  color: #ffffff;
  box-shadow:
    inset 0 0 0 0.12em #ff8a8e,
    0 0 1.2em rgb(217 58 66 / 0.6);
  animation: slip-in 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.15), em-flash 1s ease-in-out 0.5s infinite;
}

.demo-box .is-emergency .s-where,
.demo-box .is-emergency .s-what,
.demo-box .is-emergency .s-how,
.demo-box .is-emergency .s-by {
  color: #ffffff;
}

.demo-box .is-emergency .lf {
  display: none;
}

.demo-box .is-emergency .s-time {
  display: none;
}

.demo-box .is-emergency .s-sq {
  background: #ffffff;
  opacity: 0.85;
}

.demo-box .is-nope {
  animation: nope 0.4s ease;
}

/* VIEW-01: the app's shared slip, scaled to the demo's computer. */
.demo-box .mon .slip {
  grid-template-columns: 1fr auto;
  grid-template-areas: "where how" "what how";
  column-gap: 0.45em;
  height: 3.27em;
  min-width: 10em;
  padding: 0 0.4em 0 1.18em;
  flex: none;
  border-radius: 0.82em;
  font-size: 0.72em;
  white-space: nowrap;
}

.demo-box .mon .s-where {
  grid-area: where;
  align-self: end;
  color: inherit;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.18;
}

.demo-box .mon .s-what {
  grid-area: what;
  align-self: start;
  color: inherit;
  font-size: 0.91em;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  opacity: 0.72;
}

.demo-box .mon .s-how { grid-area: how; }
.demo-box .mon .s-sq { display: none; }
.demo-box .mon .is-own:not(.is-cleared) .s-by { width: min-content; max-width: none; overflow: visible; white-space: normal; }
.demo-box .mon .s-by { max-width: 8em; overflow: hidden; text-overflow: ellipsis; font-size: 0.9em; }
.demo-box .mon .slip::before,
.demo-box .joined-room::before {
  position: absolute;
  top: 0.45em;
  bottom: 0.45em;
  left: 0.45em;
  width: 0.36em;
  border-radius: 0.27em;
  background: var(--slip-room);
  content: "";
}
.demo-box .mon .slip:not(.age-2):not(.age-3) .lf-p,
.demo-box .mon .curtain-slip:not(.age-2):not(.age-3) .lf-p { stroke: var(--slip-room); }
.demo-box .mon .age-2 .lf-t { stroke: var(--slip-room); }
.demo-box .room-slip { display: flex; flex: none; align-items: stretch; }
.demo-box .room-slip[data-joined="true"] { border-radius: 0.6em; overflow: hidden; }
.demo-box .joined-room { position: relative; display: flex; align-items: center; padding: 0 0.4em 0 1.18em; background: #fff; color: #1b1f1e; font-size: 0.72em; font-weight: 800; white-space: nowrap; }
/* Fixed minima leave words and timers their intrinsic width. Two-line names wrap only at spaces. */
.demo-box .room-slip[data-joined="true"] .slip { grid-template-areas: "what how"; min-width: 8em; column-gap: 0.2em; border-radius: 0; padding: 0 0.15em; border-left: 1px solid rgb(17 24 33 / 0.15); box-shadow: none; }
.demo-box .room-slip[data-joined="true"] .s-where,
.demo-box .room-slip[data-joined="true"] .slip::before { display: none; }
.demo-box .room-slip[data-joined="true"] .s-what { align-self: center; width: min-content; white-space: normal; font-size: 1em; font-weight: 700; opacity: 1; }

/* on the phone: rows */

.demo-box .phone .slip {
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "what what how"
    "sq where how";
  column-gap: 0.4em;
  row-gap: 0.12em;
  padding: 0.5em 0.7em;
  border-radius: 0.85em;
  font-size: 0.9em;
}

.demo-box .phone .s-sq {
  grid-area: sq;
  width: 0.66em;
  height: 0.66em;
}

.demo-box .phone .s-where {
  grid-area: where;
  font-size: 0.78em;
}

.demo-box .phone .s-what {
  grid-area: what;
  font-size: 1.04em;
}

.demo-box .phone .s-how {
  grid-area: how;
  font-size: 0.85em;
}

.demo-box .phone .s-by {
  grid-area: where;
  font-size: 0.78em;
}

.demo-box .phone .is-own .s-where,
.demo-box .phone .is-cleared .s-where {
  display: none;
}

.demo-box .phone .is-own .s-sq,
.demo-box .phone .is-cleared .s-sq {
  grid-column: 1;
}

/* on the watch: cards */

.demo-box .watch .slip {
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "what what"
    "sq how";
  column-gap: 0.35em;
  row-gap: 0.1em;
  padding: 0.45em 0.6em;
  border-radius: 0.85em;
  font-size: 0.8em;
}

.demo-box .watch .s-sq {
  grid-area: sq;
  width: 0.62em;
  height: 0.62em;
}

.demo-box .watch .s-where {
  display: none;
}

.demo-box .watch .s-what {
  grid-area: what;
  overflow: hidden;
  font-size: 1.05em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-box .watch .s-how {
  grid-area: how;
  font-size: 0.85em;
}

.demo-box .watch .s-by {
  grid-area: how;
  font-size: 0.8em;
}

/* the arrival tile: a big, brief notice beside the bar (ATTENTION-03) */

.demo-box .tile {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 0.55em;
  width: 15.2em;
  padding: 0.75em 0.95em 0.85em;
  border-radius: 1.05em;
  background: #ffffff;
  color: #141b1a;
  box-shadow:
    0 0 0 0.09em rgb(0 0 0 / 0.1),
    0 1.6em 2.6em -0.9em rgb(0 0 0 / 0.55);
  animation: tile-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}

.demo-box .tile.is-leaving {
  animation: tile-out 0.45s ease forwards;
}

.demo-box .t-sq {
  width: 0.8em;
  height: 0.8em;
  border-radius: 0.22em;
  background: var(--room, #999);
  box-shadow: inset 0 0 0 0.09em rgb(0 0 0 / 0.18);
}

.demo-box .t-where {
  color: #4b5553;
  font-size: 0.95em;
  font-weight: 550;
}

.demo-box .t-what {
  grid-column: 1 / -1;
  margin-top: 0.2em;
  font-size: 1.5em;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.demo-box .tile.is-long .t-what {
  font-size: 1.15em;
}

.demo-box .tile.is-emergency {
  background: #d93a42;
  color: #ffffff;
  box-shadow:
    inset 0 0 0 0.12em #ff8a8e,
    0 0 2em rgb(217 58 66 / 0.6);
}

.demo-box .tile.is-emergency .t-where {
  color: #ffffff;
}

.demo-box .tile.is-emergency .t-sq {
  background: #ffffff;
}

/* ---------------------------------------------------------- the network */

.demo-box .wires {
  position: absolute;
  z-index: 30;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.demo-box .wire {
  fill: none;
  stroke: #14b083;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 0.1 1.2;
  stroke-dashoffset: 1.1;
  opacity: 0;
  filter: drop-shadow(0 0 3px rgb(20 176 131 / 0.8));
  animation: wire 1.05s cubic-bezier(0.45, 0.1, 0.3, 1) var(--delay, 0ms) both;
}

.demo-box .wire.em {
  stroke: #ff5a64;
  filter: drop-shadow(0 0 3px rgb(255 90 100 / 0.8));
}

.demo-box .ping,
.demo-box .ripple {
  fill: none;
  stroke: #14b083;
  stroke-width: 2.4;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.demo-box .ping {
  animation: ping 0.9s ease-out var(--delay, 0ms) both;
}

.demo-box .ripple {
  animation: ripple 1.2s ease-out both;
}

.demo-box .em.ping,
.demo-box .em.ripple {
  stroke: #ff5a64;
}

/* --------------------------------------------------------- device states */

.demo-box .dev.is-buzz.phone,
.demo-box .dev.is-buzz.watch {
  animation: buzz 0.5s ease;
}

.demo-box .dev.is-buzz.mon .mon-body {
  animation: glow 1s ease-out;
}

/* An Emergency changes the page itself (red, flashing, PAGE-06), never the device around it: the app does not glow. */

.demo-box .slip.is-new {
  animation-name: slip-in, slip-glow;
  animation-duration: 0.42s, 1.4s;
}

/* --------------------------------------------------------------- caption */

/* The caption is never more than two lines (three on a phone), so the row under the board is always the same height and the page never moves. */
.demo-box .coach {
  display: -webkit-box;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--h-ink-2);
  font-size: 13.5px;
  line-height: 1.42;
  text-wrap: balance;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.demo-box .coach.is-flash {
  animation: coach-in 0.5s ease;
}

/* ----------------------------------------------------------- the keyframes */

@keyframes h-ping {
  0% {
    opacity: 0.7;
    transform: scale(0.5);
  }

  70%,
  100% {
    opacity: 0;
    transform: scale(1.4);
  }
}

@keyframes slip-in {
  from {
    opacity: 0;
    transform: translateY(0.6em) scale(0.92);
  }
}

@keyframes slip-glow {
  0%,
  100% {
    filter: none;
  }

  20% {
    filter: drop-shadow(0 0 0.7em rgb(20 176 131 / 0.9));
  }
}

@keyframes tile-in {
  from {
    opacity: 0;
    transform: translateY(-0.8em) scale(0.9);
  }
}

@keyframes tile-out {
  to {
    opacity: 0;
    transform: translateY(-0.5em) scale(0.96);
  }
}

@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(0.8em);
  }
}

@keyframes wire {
  0% {
    opacity: 1;
    stroke-dashoffset: 1.1;
  }

  88% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    stroke-dashoffset: -0.1;
  }
}

@keyframes ping {
  0% {
    opacity: 0.9;
    transform: scale(0.35);
  }

  100% {
    opacity: 0;
    transform: scale(1.7);
  }
}

@keyframes ripple {
  0% {
    opacity: 0.85;
    transform: scale(0.4);
  }

  100% {
    opacity: 0;
    transform: scale(4.2);
  }
}

@keyframes buzz {
  10%,
  50%,
  90% {
    transform: translateX(-0.25em) rotate(-1.2deg);
  }

  30%,
  70% {
    transform: translateX(0.25em) rotate(1.2deg);
  }
}

@keyframes glow {
  0% {
    box-shadow:
      inset 0 0 0 0.1em rgb(255 255 255 / 0.07),
      inset 0 0.1em 0 rgb(255 255 255 / 0.24),
      0 0 0 0.3em rgb(20 176 131 / 0.55),
      0 0 3em rgb(20 176 131 / 0.6),
      0 2.6em 3.8em -1.8em rgb(6 24 22 / 0.65);
  }
}

@keyframes em-flash {
  50% {
    background: #b3262d;
  }
}

@keyframes nope {
  20%,
  60% {
    transform: translateX(-0.3em);
  }

  40%,
  80% {
    transform: translateX(0.3em);
  }
}

@keyframes hold-fill {
  to {
    transform: scaleX(1);
  }
}

@keyframes coach-in {
  from {
    opacity: 0.2;
    transform: translateY(4px);
  }
}

/* ----------------------------------------------------- small screens, dark */

@media (max-width: 600px) {
  .demo-box {
    --vw: 560;
    --vh: 600;
    --foot: 94px;
    --gap: 12px;
  }

  .demo-box .stage {
    border-radius: 26px;
  }

  .demo-box [data-dev="r3"] {
    --k: 0.8;
  }

  .demo-box [data-dev="r1"] {
    --k: 0.8;
  }

  .demo-box .phone .tag small,
  .demo-box .watch .tag small {
    display: none;
  }

  .demo-box .demo-foot {
    grid-template-areas:
      "live coach tools"
      "try try try";
    grid-template-rows: minmax(0, 1fr) 32px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 4px 8px;
  }

  .demo-box .live {
    grid-area: live;
    justify-self: start;
  }

  .demo-box .tools {
    grid-area: tools;
  }

  .demo-box .coach {
    grid-area: coach;
  }

  .demo-box .tool-x {
    display: none !important;
  }

  .demo-box .tool {
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
  }

  .demo-box .live {
    padding: 7px;
  }

  .demo-box .live-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .demo-box .coach {
    font-size: 12.5px;
    line-height: 1.4;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
}

/* a short laptop window has a small board: the pill keeps its dot and gives its words to the caption */
@media (max-height: 640px) and (min-width: 901px) {
  .demo-box .live {
    padding: 9px;
  }

  .demo-box .live-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* a short phone gives the board what the caption can spare: two lines, not three */
@media (max-width: 600px) and (max-height: 700px) {
  .demo-box {
    --foot: 84px;
  }

  .demo-box .coach {
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  /* OPEN-33: fit the exact caution in three lines within the existing foot. */
  .demo-box.has-caution .coach {
    line-height: 1.25;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
}

@media (prefers-color-scheme: dark) {
  .demo-box .stage {
    background:
      radial-gradient(70% 55% at 32% 0%, rgb(47 163 126 / 0.14), transparent 70%),
      linear-gradient(180deg, #131c1e, #0c1214);
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / 0.07),
      inset 0 0 0 1px rgb(255 255 255 / 0.06),
      0 34px 60px -30px rgb(0 0 0 / 0.8),
      0 90px 120px -70px rgb(47 163 126 / 0.35);
  }

  .demo-box .stage::before {
    background-image: radial-gradient(rgb(143 226 196 / 0.16) 1px, transparent 1.4px);
  }

  .demo-box .tag {
    background: rgb(20 30 32 / 0.92);
    color: #eef6f3;
    box-shadow:
      0 0 0 0.1em rgb(255 255 255 / 0.1),
      0 0.5em 1.2em -0.5em rgb(0 0 0 / 0.6);
  }

  .demo-box .tag small {
    color: #9db0ab;
  }


  .demo-box .keys {
    background: linear-gradient(#2a3033, #1c2124);
    box-shadow:
      inset 0 0.1em 0 rgb(255 255 255 / 0.08),
      0 0 0 0.1em rgb(255 255 255 / 0.06),
      0 0.9em 1.6em -0.9em rgb(0 0 0 / 0.8);
  }

  .demo-box .key {
    background: linear-gradient(#f3f6f5, #dfe4e2);
    box-shadow:
      0 0.3em 0 #6d7774,
      0 0.55em 0.8em -0.25em rgb(0 0 0 / 0.5),
      inset 0 0.1em 0 #ffffff;
  }

  .demo-box .key-em {
    background: linear-gradient(#e9505a, #d93a42);
    box-shadow:
      0 0.3em 0 #8b1e25,
      0 0.55em 0.8em -0.25em rgb(0 0 0 / 0.5),
      inset 0 0.1em 0 rgb(255 255 255 / 0.35);
  }

  .demo-box .band {
    background: linear-gradient(90deg, #22272c, #3a4148 45%, #1f2327);
  }

  .demo-box .mon-stand::before {
    background: linear-gradient(90deg, #6f7876, #c2c9c7 42%, #5f6866);
  }

  .demo-box .mon-stand::after {
    background: linear-gradient(#c9cfcd, #808987);
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo-box .stage *,
  .demo-box .stage *::before,
  .demo-box .stage *::after,
  .demo-box .live-dot::after,
  .demo-box .coach {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .demo-box .wire,
  .demo-box .ping,
  .demo-box .ripple {
    display: none;
  }

  .demo-box .slip.is-holding::after {
    animation: none;
    transform: scaleX(1);
  }
}

/* SITE-01 / T83: launch Messages live entirely inside each device's glass. */
.demo-box .msg-toggle { position: relative; display: flex; align-items: center; justify-content: center; padding: 2px; border: 0; border-radius: 8px; color: #fff; background: transparent; cursor: pointer; }
.demo-box .msg-toggle [data-msg-count] { position: absolute; top: -5px; right: -5px; padding: 1px 3px; border-radius: 9px; background: #d93a42; color: white; font: 10px/1.1 Inter, sans-serif; }
.demo-box .msg-window { position: absolute; z-index: 8; inset: 0; display: flex; flex-direction: column; border-radius: 11px; background: #f9faf9; color: #172823; font: 12px/1.2 Inter, sans-serif; overflow: hidden; text-align: left; }
.demo-box .msg-window [hidden],
.demo-box .msg-window[hidden],
.demo-box .msg-watch[hidden],
.demo-box .msg-toggle [hidden] { display: none !important; }
.demo-box .msg-window button,
.demo-box .msg-banner button,
.demo-box .msg-watch button { min-width: 20px; border: 0; padding: 3px 5px; border-radius: 12px; background: #e2ebe7; color: #164634; font: inherit; cursor: pointer; }
.demo-box .msg-window button:focus-visible,
.demo-box .msg-bubble:focus-visible,
.demo-box .msg-toggle:focus-visible,
.demo-box .msg-banner button:focus-visible,
.demo-box .msg-watch button:focus-visible { outline: 2px solid #0a7257; outline-offset: -2px; }
.demo-box .msg-title { display: flex; align-items: center; gap: 4px; flex: none; height: 20px; padding: 1px 7px; border-bottom: 1px solid #d9e2dd; }
.demo-box .msg-title strong { flex: 1; font-size: 10px; }
.demo-box .msg-title button { height: 17px; min-width: 18px; padding: 0 3px; }
.demo-box .msg-title [data-msg-close] { font-size: 18px; line-height: 17px; }
.demo-box .msg-layout { display: flex; flex: 1; min-height: 0; }
.demo-box .msg-list { width: 36px; flex: none; padding: 3px 2px; overflow: auto; border-right: 1px solid #d9e2dd; background: #edf2f0; }
.demo-box .msg-list [data-msg-new] { display: block; width: 28px; margin: 0 auto 3px; font-size: 17px; }
.demo-box .msg-conversation { position: relative; display: flex; align-items: center; width: 100%; margin-bottom: 3px; padding: 2px !important; }
.demo-box .msg-conversation[aria-current="true"] { background: #c7e6da; }
.demo-box .msg-avatar { display: inline-grid; flex: none; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #d1ded8; color: #274e3f; font-size: 11px; font-weight: 700; }
.demo-box .msg-list-detail { display: none; min-width: 0; }
.demo-box .msg-unread { position: absolute; top: 0; right: 0; color: #08764f; font-size: 9px; }
.demo-box .msg-thread { display: flex; flex-direction: column; min-width: 0; flex: 1; min-height: 0; }
.demo-box .msg-heading { display: flex; flex: none; align-items: center; gap: 4px; min-height: 19px; padding: 2px 6px; border-bottom: 1px solid #e5eae7; }
.demo-box .msg-heading strong { font-size: 10px; }
.demo-box .msg-heading small { font-size: 8.5px; color: #576b61; }
.demo-box .msg-history { position: relative; flex: 1; min-height: 0; overflow: auto; padding: 8px 7px 4px; overscroll-behavior: contain; scrollbar-width: thin; mask-image: linear-gradient(to bottom, transparent, #000 7px); }
.demo-box .msg-row { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 5px; }
.demo-box .msg-own { align-items: flex-end; }
.demo-box .msg-bubble { position: relative; max-width: 94%; padding: 4px 7px; border-radius: 10px 10px 10px 3px; background: #e8edeb; color: #172823; overflow-wrap: anywhere; touch-action: pan-y; font-size: 11px; line-height: 1.3; }
.demo-box .msg-own .msg-bubble { border-radius: 12px 12px 3px 12px; background: var(--room); color: var(--ink); }
.demo-box .msg-body { white-space: pre-wrap; }
.demo-box .msg-time,
.demo-box .msg-sender,
.demo-box .msg-receipt,
.demo-box .msg-confirmed { margin-top: 2px; font-size: 8.5px; line-height: 1.2; color: #4d6359; }
.demo-box .msg-window .msg-confirmed { max-width: 100%; padding: 1px 0; border-radius: 3px; background: transparent; color: #4d6359; text-align: right; font-size: 8.5px; line-height: 1.3; }
.demo-box .msg-window .msg-reactions { position: absolute; z-index: 1; top: -8px; right: -3px; display: flex; align-items: center; gap: 3px; padding: 2px 4px; border: 1px solid #d8e1dc; background: #fff; box-shadow: 0 1px 3px #17282314; font-size: 8.5px; line-height: 1; white-space: nowrap; }
.demo-box .msg-own .msg-reactions { right: auto; left: -3px; }
.demo-box .msg-has-reactions { padding-top: 6px; }
.demo-box .msg-has-reactions .msg-bubble { min-width: 72px; }
.demo-box .msg-quote { display: block; max-width: 100%; margin-bottom: 4px; border-left: 2px solid currentColor !important; border-radius: 3px !important; text-align: left; font-size: 10px !important; }
.demo-box .msg-wave { font-size: 12px; white-space: nowrap; margin-bottom: 4px; }
.demo-box .msg-typing { width: fit-content; padding: 4px 9px; border-radius: 15px; background: #e8edeb; color: #657b70; letter-spacing: 3px; animation: msg-shimmer 1.2s ease-in-out infinite alternate; }
.demo-box .msg-private .msg-body { display: block; min-width: 70px; filter: blur(3px); opacity: .35; user-select: none; animation: msg-private-shimmer 1.8s ease-in-out infinite alternate; }
.demo-box .msg-hold { position: absolute; inset: 0; display: grid; place-items: center; font-size: 8.5px; font-weight: 550; }
.demo-box .msg-private.msg-revealed .msg-body { filter: none; opacity: 1; animation: none; }
.demo-box .msg-revealed .msg-hold { display: none; }
.demo-box .msg-peek-key { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.demo-box .msg-peek-key:focus { inset: 0; width: 100%; height: 100%; clip-path: none; }
.demo-box .msg-form { flex: none; padding: 2px 5px; border-top: 1px solid #e5eae7; }
.demo-box .msg-compose { display: flex; align-items: center; gap: 3px; }
.demo-box .msg-compose textarea { display: block; flex: 1; width: 0; min-width: 0; height: 23px; max-height: 23px; resize: none; padding: 3px 7px; border: 1px solid #cbd8d0; border-radius: 15px; color: #172823; background: white; font: 11px/15px Inter, sans-serif; }
.demo-box .msg-compose .msg-send { display: grid; place-items: center; flex: none; width: 21px; height: 21px; min-width: 21px; padding: 2px; border-radius: 50%; background: #096747; color: white; }
.demo-box .msg-safety { margin: 2px 0 0; font-size: 7px; line-height: 1.2; color: #607368; white-space: nowrap; }
.demo-box .msg-replying { display: flex; gap: 2px; align-items: center; padding: 2px 5px; font-size: 10px; }
.demo-box .msg-replying span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.demo-box .msg-picker,
.demo-box .msg-menu { position: absolute; z-index: 3; inset: 25px 4px auto; padding: 8px; border: 1px solid #cbd8d0; border-radius: 12px; background: #fff; box-shadow: 0 5px 15px #142c3333; }
.demo-box .msg-menu { display: flex; flex-wrap: wrap; gap: 4px; }
.demo-box .msg-menu strong { width: 100%; font-size: 12px; }
.demo-box .msg-menu button { font-size: 15px; }
.demo-box .msg-banners { position: absolute; z-index: 9; top: 37px; right: 4px; width: calc(100% - 8px); pointer-events: none; }
.demo-box .msg-banner { border: 1px solid #cedbd3; border-radius: 16px; padding: 6px; background: #fafffc; color: #172823; box-shadow: 0 4px 12px #0c231e33; font: 12px/1.3 Inter, sans-serif; pointer-events: auto; }
.demo-box .msg-banner .msg-banner-open { display: grid; grid-template-columns: 28px 1fr; gap: 2px 4px; width: 100%; padding: 0; background: transparent; text-align: left; }
.demo-box .msg-banner-open .msg-avatar { grid-row: span 2; }
.demo-box .msg-banner-line { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.demo-box .msg-banner-reply { display: flex; gap: 3px; margin-top: 5px; }
.demo-box .msg-banner-reply input { width: 100%; min-width: 0; padding: 4px 6px; border: 1px solid #cbd8d0; border-radius: 15px; font: inherit; color: #172823; background: white; }
.demo-box .phone .msg-window { inset: 27px 0 36px; border-radius: 9px; }
.demo-box .phone .msg-title { padding-inline: 4px; }
.demo-box .phone .msg-layout { display: block; position: relative; }
.demo-box .phone .msg-list { display: none; width: 100%; height: 100%; border: 0; }
.demo-box .phone .msg-list-only .msg-list { display: block; }
.demo-box .phone .msg-list-only .msg-thread { display: none; }
.demo-box .phone .msg-thread { height: 100%; }
.demo-box .phone .msg-list-detail { display: flex; flex-direction: column; text-align: left; gap: 2px; font-size: 10px; }
.demo-box .phone .msg-list-detail span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.demo-box .phone .msg-conversation { gap: 4px; }
.demo-box .phone .msg-heading { padding: 3px 4px; }
.demo-box .phone .msg-heading small { display: block; }
.demo-box .phone .msg-safety { font-size: 7px; white-space: normal; }
.demo-box .phone .msg-menu { inset: 26px 3px auto; padding: 5px; }
.demo-box .phone .msg-banners { top: 33px; }
.demo-box .msg-watch { position: absolute; z-index: 4; inset: 24px 4px 30px; display: flex; flex-direction: column; gap: 4px; overflow: auto; border-radius: 12px; padding: 5px; background: #17251f; color: #fff; font: 12px/1.25 Inter, sans-serif; }
.demo-box .msg-watch-line { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.demo-box .msg-watch-actions { display: flex; gap: 3px; }
.demo-box .msg-watch button { background: #2d4639; color: white; padding: 3px; }
.demo-box .msg-watch button[aria-pressed="true"] { background: #096747; outline: 1px solid #80deb5; }
.demo-box .msg-watch > button:last-child { position: absolute; top: 0; right: 0; min-width: 15px; padding: 1px; }
.demo-box .watch.sheet-open .msg-watch { display: none; }
@keyframes msg-shimmer { from { opacity: .5; } to { opacity: 1; } }
@keyframes msg-private-shimmer { from { opacity: .2; } to { opacity: .45; } }
@media (prefers-reduced-motion: reduce) {
  .demo-box .msg-private .msg-body,
  .demo-box .msg-typing { animation: none; }
}
.demo-box .msg-lock { position: relative; display: grid; flex: none; place-items: center; width: 18px; height: 23px; border-radius: 7px; color: #607368; }
.demo-box .msg-lock input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.demo-box .msg-lock:has(:checked) { background: #c7e6da; color: #096747; box-shadow: inset 0 0 0 1px #096747; }
.demo-box .msg-lock:has(:focus-visible) { outline: 2px solid #096747; outline-offset: -2px; }
.demo-box .msg-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 100%; }
.demo-box .msg-revealed .msg-peek-key { opacity: 0; }
.demo-box .msg-watch { inset: 4px 4px 27px; gap: 2px; padding: 5px; font-size: 11px; }
.demo-box .msg-watch > * { flex-shrink: 0; }
.demo-box .msg-watch > strong { padding-right: 10px; }
.demo-box .msg-watch-line { line-height: 12px; }
.demo-box .msg-watch-actions button { padding: 2px 3px; }
.demo-box .phone .msg-bubble { font-size: 11px; }
.demo-box .msg-watch-unread { position: relative; }
.demo-box [data-msg-watch-count] { position: absolute; right: -3px; top: -5px; border-radius: 6px; padding: 1px 2px; background: #d93a42; color: #fff; font: 8px/1 Inter, sans-serif; }
.demo-box [data-msg-watch-count][hidden] { display: none; }
.demo-box .msg-watch { padding: 3px; }
.demo-box .msg-watch > button:not(:last-child) { padding: 1px 3px; }

.demo-box .msg-picker { inset: 21px 0 0; border: 0; border-radius: 0; box-shadow: none; padding: 5px 8px; overflow: auto; overscroll-behavior: contain; }
.demo-box .msg-picker > strong { font-size: 10px; }
.demo-box .msg-picker ul { list-style: none; margin: 2px 0 0; padding: 0; }
.demo-box .msg-picker li { margin: 0; padding: 0; }
.demo-box .msg-picker button { display: block; width: 100%; padding: 2.5px 4px; border-radius: 4px; background: transparent; font-size: 10px; line-height: 1.15; text-align: left; }
.demo-box .msg-picker button:hover { background: #edf4f0; }
.demo-box .msg-heading-name { display: flex; flex: 1; min-width: 0; align-items: baseline; gap: 5px; }
.demo-box .phone .msg-heading-name { flex-direction: column; gap: 1px; }
.demo-box .msg-confirm-chip { display: flex; flex: none; align-items: center; gap: 2px; padding: 3px 4px; border-radius: 8px; color: #4d6359; background: #edf2ef; font-size: 8px; white-space: nowrap; cursor: pointer; }
.demo-box .msg-confirm-chip input { width: 9px; height: 9px; margin: 0; accent-color: #096747; }
.demo-box .msg-confirm-chip:has(:checked) { color: #096747; background: #d6eee2; }
.demo-box .msg-confirm-chip:has(:focus-visible) { outline: none; box-shadow: inset 0 0 0 2px #096747; }
.demo-box .msg-confirm-chip input:focus-visible { outline: none; }
.demo-box .msg-compose textarea:focus-visible { outline: 2px solid #096747; outline-offset: -2px; }
.demo-box .msg-lock svg { width: 13px; height: 13px; }
.demo-box .msg-send svg { width: 17px; height: 17px; }
.demo-box .msg-sender { margin: 0 0 2px 5px; }
.demo-box .mon [data-msg-back] { display: none; }
.demo-box .phone .msg-confirm-chip { font-size: 7px; padding: 3px 2px; }
.demo-box .phone .msg-confirm-chip input { width: 8px; height: 8px; }
@media (max-width: 600px) {
  .demo-box .mon .msg-layout { display: block; position: relative; }
  .demo-box .mon .msg-list { display: none; width: 100%; height: 100%; border: 0; }
  .demo-box .mon .msg-list-only .msg-list { display: block; }
  .demo-box .mon .msg-list-only .msg-thread { display: none; }
  .demo-box .mon .msg-thread { height: 100%; }
  .demo-box .mon [data-msg-back] { display: block; }
  .demo-box .mon .msg-list-detail { display: flex; flex-direction: column; min-width: 0; text-align: left; gap: 2px; font-size: 10px; }
  .demo-box .mon .msg-list-detail span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .demo-box .mon .msg-conversation { gap: 4px; }
}

/* Early site: a right-anchored panel below the computer's live top bar. */
.demo-box[data-messaging="today"] .mon .msg-window { top: calc(33px * var(--k, 1)); border-radius: 0 0 9px 9px; }
.demo-box[data-messaging="today"] .mon .msg-title { position: absolute; top: 0; right: 0; z-index: 2; padding-inline: 3px; border: 0; }
.demo-box[data-messaging="today"] .mon .msg-title strong { display: none; }
.demo-box[data-messaging="today"] .mon .msg-heading { padding-right: 45px; }
.demo-box[data-messaging="today"] .msg-private .msg-body { filter: none; opacity: 1; animation: none; }
.demo-box[data-messaging="today"] .msg-hold { position: static; display: block; margin-top: 2px; }
.demo-box[data-messaging="today"] .msg-revealed .msg-hold { display: none; }


/* Fixed desktop tools, Tasks and curtain stay inside their own screen. */
.demo-box .bar-menu { position: absolute; z-index: 20; top: 3.3em; right: 0.3em; min-width: 12em; padding: 0.25em; border: 1px solid #b7c0cc; border-radius: 0.5em; background: #f8fafc; color: #1b1f1e; box-shadow: 0 0.5em 1em rgb(0 0 0 / 0.2); }
.demo-box .bar-menu button { display: flex; align-items: center; gap: 0.65em; width: 100%; padding: 0.28em 0.65em; border: 0; border-radius: 0.3em; background: transparent; color: inherit; font: inherit; text-align: left; }
.demo-box .bar-menu button:hover,
.demo-box .bar-menu button:focus { background: #dce4ef; outline: 2px solid #096747; outline-offset: -2px; }
.demo-box .bar-r .bar-control { position: relative; display: grid; place-items: center; flex: none; width: 1.25em; height: 2.1em; padding: 0; border: 0; border-radius: 0.3em; color: inherit; background: transparent; cursor: pointer; }
.demo-box .bar-r .bar-control .gl { width: 1.05em; height: 1.05em; }
.demo-box .bar-r .bar-em { margin: 0 0.18em; color: #fff; background: #d93a42; }
.demo-box .bar-divider { height: 1.35em; width: 1px; margin: 0 0.12em; background: rgb(255 255 255 / 0.2); }
.demo-box .bar-control:hover { background: rgb(255 255 255 / 0.15); }
.demo-box .bar-control:focus-visible,
.demo-box .bar-overflow:focus-visible,
.demo-box .curtain:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
/* The open list leaves the bar's flow; +N keeps its place beside the fixed controls. */
.demo-box .pages-expanded + .bar-overflow { margin-left: auto; }
.demo-box .pages-expanded + .bar-overflow + .bar-r { margin-left: 0; }
.demo-box .bar-overflow { flex: none; border: 0; padding: 0.1em; color: #fff; background: transparent; font-family: inherit; font-size: 0.8em; cursor: pointer; }
.demo-box .joined-room.is-own { background: #dde3e1; }
.demo-box .joined-room.is-cleared { background: #d9f0e2; color: #155d35; }
.demo-box .joined-room.is-emergency { background: #d93a42; color: #fff; }
.demo-box .joined-room.is-own::before,
.demo-box .joined-room.is-cleared::before,
.demo-box .joined-room.is-emergency::before { display: none; }
.demo-box .pills:not(.pages-expanded) .room-slip[data-extra="true"] { visibility: hidden; }
.demo-box .pages-expanded { position: absolute; z-index: 8; top: 3.3em; left: 0; right: 0; height: auto; max-height: 12em; display: flex; flex-direction: column; flex-wrap: nowrap; gap: 0.4em; padding: 0.5em; overflow: auto; background: #2f3641; }
.demo-box .pages-expanded .room-slip { flex-direction: column; }
.demo-box .pages-expanded .joined-room { padding-top: 0.4em; padding-bottom: 0.4em; }
.demo-box .pages-expanded .slip { flex: none; }
.demo-box .pages-expanded .room-slip[data-joined="true"] .slip { border-left: 0; border-top: 1px solid rgb(17 24 33 / 0.15); }
.demo-box .demo-helper { position: absolute; z-index: 40; top: 3.6em; right: 0.5em; max-width: calc(100% - 1em); padding: 0.45em 0.7em; border-radius: 0.5em; background: #18212b; color: #fff; font-size: 0.95em; pointer-events: none; }
.demo-box .tasks-window { position: absolute; z-index: 12; inset: 3.5em 0.4em 0.4em; display: flex; flex-direction: column; border: 1px solid #b7c0cc; border-radius: 0.65em; background: #f8fafc; color: #1b1f1e; overflow: hidden; font-size: 0.95em; }
.demo-box .tasks-window header { display: flex; align-items: center; justify-content: space-between; padding: 0.35em 0.7em; background: #e8edf3; }
.demo-box .tasks-window button { border: 0; border-radius: 0.4em; padding: 0.35em 0.55em; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.demo-box .tasks-window button:focus-visible,
.demo-box .tasks-window input:focus-visible,
.demo-box .kudos-card button:focus-visible { outline: 2px solid #096747; outline-offset: -2px; }
.demo-box .tasks-window nav { display: flex; gap: 0.35em; padding: 0.3em 0.5em; border-bottom: 1px solid #d5dde6; }
.demo-box .tasks-window nav [aria-pressed="true"] { background: #dce4ef; font-weight: 700; }
.demo-box .tasks-list { min-height: 0; overflow: auto; padding: 0.2em 0.5em; }
.demo-box .task-row { display: flex; align-items: center; gap: 0.5em; margin: 0; padding: 0.35em 0.2em; line-height: 1.2; border-bottom: 1px solid #e2e7ed; font-size: 0.92em; }
.demo-box .task-row input { flex: none; width: 1.1em; height: 1.1em; margin: 0; accent-color: #4f5a6c; }
.demo-box .task-row > span { flex: 1; min-width: 0; }
.demo-box .task-row small { display: block; margin-top: 0.1em; color: #566172; font-size: 0.82em; }
.demo-box .tasks-day { margin: 0.2em; font-size: 0.85em; font-weight: 700; }
.demo-box .completed-task button { color: #b13073; font-size: 1.25em; }
.demo-box .task-heart { position: absolute; right: -0.15em; bottom: -0.12em; border-radius: 50%; background: #2f3641; color: #f472b6; }
.demo-box .bar-r .task-heart .gl { width: 0.7em; height: 0.7em; fill: currentColor; }
.demo-box .is-new-kudos { background: #fce7f3; }
.demo-box .kudos-card { position: absolute; z-index: 15; top: 3.6em; right: 0.5em; max-width: 23em; padding: 0.65em; border: 1px solid #64748b; border-radius: 0.6em; background: #fff; color: #253142; font-size: 0.9em; box-shadow: 0 0.3em 1em #0003; }
.demo-box .kudos-card button { margin-left: 0.5em; padding: 0.3em; border: 0; border-radius: 0.3em; font: inherit; cursor: pointer; }
.demo-box .curtain { position: absolute; z-index: 30; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.7em; padding: 1em; overflow: auto; background: radial-gradient(ellipse at center, #273c46, #111e2c); color: #fff; cursor: pointer; }
.demo-box .curtain-brand { display: flex; align-items: center; gap: 0.5em; }
.demo-box .curtain-clock { font-size: 2.5em; font-weight: 300; line-height: 1; }
.demo-box .curtain-pages { display: flex; flex-direction: column; gap: 0.35em; width: 90%; }
.demo-box .curtain-slip { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "what what what" "sq where how"; align-items: center; gap: 0.35em; padding: 0.55em 0.8em; border-radius: 0.7em; background: #fff; color: #141b1a; font-size: 0.85em; }
.demo-box .mon .curtain-slip .s-sq { display: inline-block; grid-area: sq; }
.demo-box .mon .curtain-slip .s-where { font-weight: 500; align-self: center; }
.demo-box .mon .curtain-slip .s-what { font-size: 1.15em; font-weight: 700; opacity: 1; }
.demo-box .curtain-slip.is-emergency { background: #d93a42; color: #fff; }
.demo-box .curtain-message { font-size: 0.85em; }
.demo-box [data-more-menu][hidden],
.demo-box [data-tasks-window][hidden],
.demo-box [data-tasks-list][hidden],
.demo-box [data-tasks-completed][hidden],
.demo-box [data-task][hidden],
.demo-box [data-task-heart][hidden],
.demo-box [data-curtain][hidden],
.demo-box [data-curtain-message][hidden],
.demo-box [data-helper-box][hidden],
.demo-box [data-overflow][hidden] { display: none; }


/* VIEW-04/05: the Control Center group and cells, scaled to a demo monitor. */
.demo-box .bar-mark { border: 0; padding: 0; font: inherit; cursor: pointer; }
.demo-box .office-map { position: absolute; z-index: 4; inset: 3.3em 0 0; display: flex; flex-direction: column; padding: 0.4em; background: #2f3641; color: #fff; }
.demo-box .map-title { display: flex; align-items: center; gap: 0.6em; height: 1.6em; flex: none; padding: 0 0.4em 0.3em; }
.demo-box .map-title strong { font-size: 1.05em; }
.demo-box .map-title span { opacity: 0.65; font-size: 0.75em; }
.demo-box .map-title button { margin-left: auto; }
.demo-box .office-map button { border: 0; font-family: inherit; cursor: pointer; }
.demo-box .map-title button { padding: 0 0.3em; border-radius: 0.3em; background: rgb(255 255 255 / 0.12); color: #fff; font-size: 1.2em; }
.demo-box .map-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 0.4em; min-height: 0; flex: 1; padding: 0.4em; border: 1px solid rgb(255 255 255 / 0.26); border-radius: 1em; background: rgb(255 255 255 / 0.06); box-shadow: 0 18px 40px -18px rgb(0 0 0 / 0.75); }
.demo-box .map-room { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 0.3em; border-radius: 1.4em; background: var(--cell-fill); box-shadow: inset 0 0 0 1.5px var(--cell-edge), inset 0 1px 0 rgb(255 255 255 / 0.07), var(--cell-glow); }
.demo-box .map-room[data-map-room="fd"] { grid-column: 3; grid-row: 1 / 3; }
.demo-box .map-room header { display: flex; align-items: center; gap: 0.3em; flex: none; height: 1.6em; white-space: nowrap; }
.demo-box .map-room header strong { font-size: 1.05em; font-weight: 800; line-height: 1.35; }
.demo-box .map-dot { flex: none; width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--cell-dot); }
.demo-box .map-room:not([data-state="quiet"]) .map-dot { display: none; }
.demo-box .map-device { display: inline-flex; margin-left: auto; }
.demo-box .map-device .gl { width: 0.85em; height: 0.85em; }
.demo-box [data-map-more] { margin-left: auto; padding: 0.15em 0.3em; border-radius: 999px; background: rgb(17 24 33 / 0.82); color: #fff; font-size: 0.6em; font-weight: 800; }
.demo-box .map-pages { min-height: 0; flex: 1; display: grid; grid-auto-rows: calc((100% - 6px) / 4); gap: 2px; overflow: auto; }
.demo-box .map-slip { position: relative; flex: none; display: flex; align-items: center; gap: 0.25em; min-width: 0; width: 100%; height: 100%; min-height: 0; padding: 0 0.25em 0 0.7em; border-radius: 0.64em; background: #fff; color: #1b1f1e; font-size: 0.52em; text-align: left; }
.demo-box .map-slip::before { position: absolute; top: 0.27em; bottom: 0.27em; left: 0.27em; width: 0.27em; border-radius: 0.18em; background: var(--slip-room); content: ""; }
.demo-box .map-slip > .gl { flex: none; width: 1.05em; height: 1.05em; color: #6b7280; }
.demo-box .mon .map-slip .s-where,
.demo-box .mon .map-slip .s-sq,
.demo-box .mon .map-slip .s-by { display: none; }
.demo-box .mon .map-slip .s-what { flex: 1; min-width: 0; overflow: hidden; margin: 0; font-size: 1em; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; text-overflow: ellipsis; opacity: 1; }
.demo-box .mon .map-slip .s-how { flex: none; display: flex; gap: 0.2em; font-size: 1em; }
.demo-box .map-slip .s-time { width: 3em; font-variant-numeric: tabular-nums; text-align: right; }
.demo-box .map-slip.is-own { background: #dde3e1; }
.demo-box .map-slip.is-own .s-time { display: inline; }
.demo-box .map-slip.is-cleared { background: #d9f0e2; }
.demo-box .map-slip.is-emergency { background: #d93a42; color: #fff; }
.demo-box .map-slip.is-emergency::before,
.demo-box .map-slip.is-cleared::before { display: none; }
.demo-box .map-slip.is-emergency > .gl { color: #fff; }
.demo-box .office-map button:focus-visible,
.demo-box .bar-mark:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.demo-box .map-slip:focus-visible { outline-color: #096747 !important; }

/* PAGE-07: two columns, full names on hover, the same send and Undo as the keys. */
.demo-box .quick-pages { position: absolute; z-index: 4; top: 3.8em; right: 0.6em; width: 26em; max-width: calc(100% - 1.2em); padding: 0.4em; border: 1px solid rgb(255 255 255 / 0.26); border-radius: 0.9em; background: rgb(32 38 48 / 0.94); color: #f7f9fc; box-shadow: 0 0.4em 1em rgb(0 0 0 / 0.2); }
.demo-box .quick-pages header { display: flex; align-items: center; gap: 0.4em; height: 2.2em; }
.demo-box .quick-pages header strong { flex: 1; font-size: 1.1em; }
.demo-box .quick-pages button { padding: 0; border: 0; border-radius: 0.4em; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.demo-box .quick-pages header button { display: grid; place-items: center; width: 1.9em; height: 1.9em; }
.demo-box .quick-pages header .gl { width: 1.35em; height: 1.35em; }
.demo-box .quick-pages button:hover { background: rgb(128 140 158 / 0.2); }
.demo-box .quick-pages button:focus-visible { outline: 2px solid #4fe0ae; outline-offset: -2px; }
.demo-box .quick-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.3em; }
.demo-box .quick-row { min-width: 0; height: 2.6em; border-radius: 0.5em; background: rgb(255 255 255 / 0.07); }
.demo-box .quick-row > button { display: flex; align-items: center; gap: 0.4em; width: 100%; height: 100%; padding: 0.3em; }
.demo-box .quick-square { display: grid; place-items: center; flex: none; width: 2em; height: 2em; border-radius: 0.5em; background: var(--page-color); color: #fff; }
.demo-box .quick-square .gl { width: 1.35em; height: 1.35em; }
.demo-box .quick-name { min-width: 0; overflow: hidden; font-size: 1.1em; white-space: nowrap; text-overflow: ellipsis; }
.demo-box .quick-row kbd { margin-left: auto; font: 0.8em/1 inherit; opacity: 0.6; }
.demo-box .quick-emergency { color: #ffaaa9; background: rgb(215 0 21 / 0.16); }
.demo-box .quick-sent { display: flex; align-items: center; justify-content: space-between; height: 100%; padding: 0 0.5em; font-size: 1.1em; }
.demo-box .quick-sent button { text-decoration: underline; padding: 0.3em; }
.demo-box .quick-pages.is-light { background: rgb(248 250 252 / 0.96); color: #202630; border-color: #b7c0cc; }
.demo-box .quick-pages.is-light .quick-row { background: rgb(32 38 48 / 0.06); }
.demo-box .quick-pages.is-light .quick-emergency { color: #d70015; background: rgb(215 0 21 / 0.09); }
.demo-box [data-widget-theme] .gl:last-child,
.demo-box .is-light [data-widget-theme] .gl:first-child { display: none; }
.demo-box .is-light [data-widget-theme] .gl:last-child { display: block; }
.demo-box [data-dev="r3"] .tiles { top: 12.8em; left: 0.6em; right: 0.6em; flex-direction: row; justify-content: flex-end; }
.demo-box [data-dev="r3"] .tile { max-width: calc(50% - 0.25em); }
.demo-box .mon-screen:has([data-office-map]:not([hidden]), [data-msg-window]:not([hidden]), [data-tasks-window]:not([hidden]), [data-timers-window]:not([hidden]), [data-more-menu]:not([hidden]), [data-curtain]:not([hidden]), .pages-expanded, .msg-banner, .kudos-card) .quick-pages { visibility: hidden; }
.demo-box .key-receipt { position: absolute; bottom: 5.6em; line-height: 1; right: 0.5em; padding: 0.2em 0.6em; border-radius: 0.5em; background: #2f3641; color: #fff; font-size: 1em; }
.demo-box .key-receipt button { margin-left: 0.4em; padding: 0.2em; border: 0; background: transparent; color: #9ff5d6; font: inherit; text-decoration: underline; cursor: pointer; }
.demo-box .key-receipt button:focus-visible { outline: 2px solid #fff; outline-offset: 0; }
.demo-box [data-office-map][hidden],
.demo-box [data-map-more][hidden],
.demo-box [data-key-receipt][hidden],
.demo-box .quick-pages [hidden] { display: none !important; }

.demo-box .mon .map-slip:not(.age-2):not(.age-3) .lf-p { stroke: var(--slip-room); }

.demo-box .is-locked [data-key-receipt] { visibility: hidden; }

/* TIMER-01/02: the app panel, fitted to the same glass as Tasks. */
.demo-box .timers-window { position: absolute; z-index: 12; inset: 3.5em 0.4em 0.4em; display: flex; flex-direction: column; border: 1px solid #b7c0cc; border-radius: 0.65em; background: #f8fafc; color: #1b1f1e; overflow: hidden; font-size: 0.95em; }
.demo-box .timers-window header { display: flex; align-items: center; justify-content: space-between; padding: 0.35em 0.7em; background: #e8edf3; }
.demo-box .timers-window header strong { display: flex; align-items: center; gap: 0.4em; }
.demo-box .timers-window .gl { width: 1.25em; height: 1.25em; }
.demo-box .timers-window button { border: 1px solid #d5dde6; border-radius: 0.4em; padding: 0.3em 0.5em; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.demo-box .timers-window header button { border: 0; }
.demo-box .timers-body { position: relative; min-height: 0; overflow: auto; padding: 0.5em; }
.demo-box .timers-window .timer-new { background: #0b7a5c; border: 0; color: #fff; padding: 0.35em 0.75em; font-weight: 600; box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 1px 1px rgba(16,24,23,0.12); }
.demo-box .timer-new:hover { background: #0a6b51; }
.demo-box .timer-heading, .demo-box .timers-body h3 { display: block; margin: 0.4em 0 0.2em; font-size: 0.9em; }
.demo-box .timer-quick { display: flex; flex-wrap: wrap; gap: 0.25em; }
.demo-box .timer-quick button { font-size: 0.85em; }
.demo-box .timer-row { display: flex; align-items: center; gap: 0.35em; margin-bottom: 0.2em; border: 1px solid #d5dde6; border-radius: 0.5em; padding: 0.2em 0.25em 0.2em 0.45em; background: #fff; }
.demo-box .timer-words { flex: 1; min-width: 0; }
.demo-box .timer-words strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 0.9em; }
.demo-box .timer-words small { display: none; }
.demo-box .timer-clock { flex: none; font-size: 1.05em; font-weight: 600; font-variant-numeric: tabular-nums; }
.demo-box .timer-actions { flex: none; display: flex; gap: 0.2em; font-size: 0.8em; }
.demo-box .timer-actions button { padding: 0.2em 0.4em; }
.demo-box [data-timer-responses] .timer-row { border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.1); }
.demo-box .timers-window button:focus-visible, .demo-box .sticky-note button:focus-visible,
.demo-box .note-undo button:focus-visible { outline: 2px solid #096747; outline-offset: -2px; }
.demo-box [data-timers-window][hidden], .demo-box [data-timer-ringing][hidden] { display: none; }

/* NOTE-01: yellow Paper from stickyNoteTheme; the small screen halves its 16px corners. */
.demo-box .sticky-note { position: absolute; z-index: 16; display: flex; flex-direction: column; width: 11em; height: 8.7em; border-radius: 0.8em; color: #23232B; background-color: #FFF1A8; background-image: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0) 35%); box-shadow: 0 1px 1px rgba(60,50,10,0.10), 0 4px 10px rgba(60,50,10,0.14), 0 14px 24px -10px rgba(30,30,40,0.30), inset 0 1px 0 rgba(255,255,255,0.75); }
.demo-box .sticky-note:focus-within { z-index: 17; }
.demo-box .is-locked .sticky-note { z-index: 31; }
.demo-box .sticky-note button { border: 0; color: inherit; font: inherit; cursor: pointer; }
.demo-box .note-handle { flex: none; width: calc(100% - 4.8em); height: 2em; padding: 0; background: transparent; cursor: grab; touch-action: none; }
.demo-box .note-handle span { display: block; margin: auto; width: 2em; height: 0.3em; border-radius: 1em; background: rgba(35,35,43,0.18); pointer-events: none; }
.demo-box .note-body { flex: 1; min-height: 0; padding: 0 0.6em; }
.demo-box .note-body textarea { display: block; width: 100%; height: 100%; resize: none; border: 0; padding: 0.1em; border-radius: 0; background: transparent; color: inherit; font: inherit; line-height: 1.3; white-space: pre-wrap; }
.demo-box .note-time { flex: none; padding: 0.3em 0.8em; font-size: 0.7em; opacity: 0.6; }
.demo-box .note-toolbar { position: absolute; right: 0.3em; top: 0.3em; display: flex; gap: 0.1em; padding: 0.1em; border-radius: 0.6em; background: rgba(255,255,255,0.62); backdrop-filter: blur(16px) saturate(180%); border: 1px solid rgba(255,255,255,0.75); box-shadow: 0 6px 18px rgba(20,28,40,0.18), inset 0 1px 0 rgba(255,255,255,0.9); color: #2A2F37; opacity: 0; }
.demo-box .sticky-note:hover .note-toolbar, .demo-box .sticky-note:focus-within .note-toolbar { opacity: 1; }
.demo-box .note-toolbar button { display: grid; place-items: center; width: 1.8em; height: 1.8em; padding: 0.2em; background: transparent; border-radius: 0.3em; }
.demo-box .note-toolbar .gl { width: 1.2em; height: 1.2em; }
.demo-box [data-note-eye] .gl { stroke-width: 2.25; }
.demo-box [data-private="false"] [data-note-eye] .gl:last-child,
.demo-box [data-private="true"] [data-note-eye] .gl:first-child { display: none; }
.demo-box .note-veil { width: 100%; height: 100%; overflow: auto; background: #00000010; border-radius: 0.4em; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; }
.demo-box .note-undo { position: absolute; z-index: 22; bottom: 0.4em; left: 0.5em; padding: 0.4em 0.6em; background: #fff; color: #23232B; border-radius: 0.5em; font-size: 0.9em; }
.demo-box .note-undo button { border: 0; background: transparent; color: #096747; font: inherit; font-weight: 700; cursor: pointer; }
.demo-box .sticky-note[hidden], .demo-box .note-undo[hidden] { display: none; }

.demo-box .mon .slip.is-timer:not(.is-cleared)::before { background: #b7c0cc; }

/* The open page list stays reachable above local windows and paper. */
.demo-box .mon-screen:has([data-timers-window]:not([hidden]), .sticky-note) > .bar:has(.pages-expanded) { z-index: 18; }

/* Emergency from the phone or the watch: one tap, then 3 seconds to Undo, as on a computer (Adam, 2026-10-29). */
.demo-box .dev-undo { position: absolute; z-index: 6; left: 50%; bottom: 6.6em; transform: translateX(-50%); display: flex; align-items: center; gap: 0.5em; padding: 0.3em 0.35em 0.3em 0.7em; border-radius: 999px; background: #2b1416; color: #fff; font-size: 0.72em; font-weight: 600; white-space: nowrap; box-shadow: 0 4px 14px rgb(0 0 0 / 0.35); }
.demo-box .dev-undo button { border: 0; border-radius: 999px; padding: 0.25em 0.7em; background: #fff; color: #b3261e; font: inherit; cursor: pointer; }
.demo-box .dev-undo button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.demo-box .watch .dev-undo { bottom: 3.6em; font-size: 0.62em; }
.demo-box .dev-undo[hidden] { display: none; }

/* A normal button row after the office; narrow boards scroll only this row. */
.demo-box .demo-try {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: thin;
}
.demo-box .demo-try button {
  flex: none;
  padding: 4px 8px;
  border: 1px solid var(--h-line-2);
  border-radius: 7px;
  background: var(--h-card);
  color: var(--h-ink-2);
  font: inherit;
  font-size: 12.5px;
  line-height: 18px;
  cursor: pointer;
}
.demo-box .demo-try button:hover { background: var(--h-accent-soft); }
.demo-box .demo-try button:focus-visible { outline: 2px solid var(--h-accent); outline-offset: -2px; }
@media (max-width: 600px) {
  .demo-box .demo-try { grid-area: try; }
}

/* SITE-01, Adam, 2026-10-30: Option A, 300 by 225 board units; 240 by 180 on phones. */
.demo-box .ipad-body { height: 22.5em; padding: 0.55em; border-radius: 1.6em; }
.demo-box .ipad-screen { height: 100%; aspect-ratio: auto; border-radius: 1.05em; background: #202630; }
.demo-box .station-bar { height: 5.6em; padding-top: 1.7em; }
.demo-box .station-chip { position: absolute; top: 0.25em; left: 0.5em; padding: 0.12em 0.5em; border: 1px solid var(--room); border-radius: 2em; background: #20424b; color: #fff; font-size: 0.85em; font-weight: 700; }
.demo-box .ipad .office-map { inset: 6.223em 8em 0 0; font-size: 0.9em; }
.demo-box .ipad .map-title span,
.demo-box .ipad [data-map-close] { display: none; }
.demo-box .ipad .map-room { border-radius: 0.7em; }
.demo-box .ipad .map-room header strong { font-size: 0.85em; }
.demo-box .ipad .map-device { display: none; }
.demo-box .ipad .station-quick { top: 5.8em; right: 0.4em; width: 6.6em; padding: 0.3em; }
.demo-box .station-quick header strong { font-size: 0.85em; white-space: nowrap; }
.demo-box .station-quick .quick-columns { grid-template-columns: 1fr; }
.demo-box .station-quick .quick-row { height: 3em; }
.demo-box .station-quick .quick-row > button { justify-content: center; font-size: 0.9em; font-weight: 650; }
.demo-box .ipad-screen:has([data-office-map]:not([hidden])) .station-quick { visibility: visible; }
.demo-box .ipad-screen:has([data-msg-window]:not([hidden]), [data-tasks-window]:not([hidden]), [data-more-menu]:not([hidden]), .pages-expanded, .msg-banner) .station-quick { visibility: hidden; }
.demo-box .ipad .bar-menu { top: 5.6em; }
.demo-box .ipad .msg-window,
.demo-box[data-messaging="today"] .ipad .msg-window,
.demo-box .ipad .tasks-window { top: calc(56px * var(--k, 1)); }
.demo-box .ipad .dev-undo { bottom: 0.4em; }
.demo-box .ipad .slip.is-cleared { background: #fff; }
.demo-box .task-who { position: absolute; inset: 3em 0.5em 0.5em; z-index: 2; padding: 0.6em; border-radius: 0.7em; background: #fff; color: #202630; display: flex; flex-wrap: wrap; align-content: center; gap: 0.4em; }
.demo-box .task-who strong { width: 100%; }
.demo-box .task-who button { padding: 0.4em 0.6em; border: 1px solid #c5cdd6; border-radius: 0.4em; background: #edf1f0; color: inherit; font: inherit; }
/* Talk is a notice on the bar, with page and message controls still available. */
.demo-box .talk-notice { position: absolute; z-index: 25; top: 3.4em; left: 0.3em; display: flex; align-items: center; gap: 0.5em; padding: 0.3em 0.6em; border-radius: 1em; background: #d8eee6; color: #14523e; font-size: 0.85em; font-weight: 700; pointer-events: none; }
.demo-box .ipad .talk-notice { top: 0.35em; left: auto; right: 0.6em; font-size: 0.7em; }
.demo-box .watch .talk-notice { top: 3.8em; left: 0.5em; right: 0.5em; justify-content: center; font-size: 0.8em; padding: 0.6em 0.2em; }
.demo-box .talk-notice[hidden] { display: none; }
.demo-box .talk-level { width: 0.6em; height: 1em; border-radius: 0.3em; background: #2d9271; animation: talk-level 700ms ease-in-out infinite alternate; }
@keyframes talk-level { to { transform: scaleY(0.4); opacity: 0.65; } }
.demo-box .ph-actions { display: flex; flex: none; gap: 0.4em; margin-top: 0.4em; }
.demo-box .ph-talk,
.demo-box .ph-page { position: relative; flex: 1; min-width: 0; z-index: 3; padding: 0.5em; border: 1px solid #b1d6c9; border-radius: 2em; background: #edf6f2; color: #14523e; font: 700 0.95em/1.3 var(--font); cursor: pointer; touch-action: none; }
.demo-box .ph-page { background: #28ad85; color: #071b14; }
.demo-box .ph-talk[aria-pressed="true"] { background: #17664d; color: #fff; box-shadow: inset 0 0 0 2px #99d6c1; }

.demo-box .ph-talk:focus-visible,
.demo-box .ph-page:focus-visible { outline: 2px solid #14523e; outline-offset: 2px; }
.demo-box .demo-try .label,
.demo-box .coach .label { display: inline; padding: 1px 4px; margin: 0; font-size: 9px; line-height: 1.2; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .demo-box .talk-level { animation: none; }
}

/* SITE-01, Adam, 2026-10-30: full Talk caption and label use the short-phone foot. */
@media (max-width: 600px) and (max-height: 700px) {
  .demo-box.has-talk-caption .demo-foot { grid-template-areas: "coach coach tools" "try try try"; }
  .demo-box.has-talk-caption .live { display: none; }
  .demo-box.has-talk-caption .coach { line-height: 1.25; -webkit-line-clamp: 3; line-clamp: 3; }
}

.demo-box .ipad .map-slip.is-cleared { background: #fff; }
.demo-box .ipad .map-slip.is-cleared .s-what { display: none; }
.demo-box .ipad .map-slip.is-cleared .s-by { display: inline; max-width: 100%; font-size: 1em; }
.demo-box [data-map-room="r1"] .map-device .gl { transform: rotate(90deg); }

/* SITE-01, Adam, 2026-10-30: Pages actions remain reachable while Messages or Send is open. */
.demo-box .phone .msg-window { bottom: calc(66px * var(--k, 1)); }
.demo-box .ph-sheet { bottom: 8.2em; }
