:root {
  --blue: #125cf7;
  --ink: #f4f6fb;
  --muted: #b7c0d4;
  --panel: rgba(14, 20, 36, 0.78);
  --line: rgba(255, 255, 255, 0.14);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #0e1424; color: var(--ink); font-family: var(--font); }
body { background: radial-gradient(ellipse at top, #1a2644, #0e1424 70%) fixed; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: #9db9ff; }

#app { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.loading { color: var(--muted); }

.card { width: min(440px, 100%); padding: 28px 28px 24px; border-radius: 16px; background: var(--panel);
  border: 1px solid var(--line); backdrop-filter: blur(10px); box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.card.wide { width: min(640px, 100%); }
h1 { margin: 0 0 20px; font-size: 30px; letter-spacing: -.01em; }
h2 { margin: 0 0 14px; font-size: 20px; }
p { line-height: 1.5; }
.note { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 16px 0 0; font-size: 14px; }

label { display: block; margin: 0 0 14px; font-size: 13px; color: var(--muted); }
input, select { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--ink); font-size: 16px; }
select option { background: #0e1424; color: var(--ink); }
input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid #9db9ff; outline-offset: 2px; }

.btn { padding: 12px 16px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; font-weight: 600; font-size: 16px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: progress; }
.btn:not(:disabled):hover { filter: brightness(1.1); }
.btn.quiet { padding: 8px 14px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--ink); font-size: 14px; }
.btn.quiet:not(:disabled):hover { background: rgba(255,255,255,.12); }
.btn.danger { background: #c0392b; }
a.btn { display: inline-block; text-decoration: none; }

.error { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; background: rgba(255, 120, 120, .14); color: #ffc2c2; font-size: 14px; }
.ok { margin: 0 0 14px; padding: 10px 12px; border-radius: 8px; background: rgba(120, 220, 160, .14); color: #bff0d2; font-size: 14px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 20px; }
.top h1 { margin: 0; }
.who { margin: 0 0 16px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }

.chars { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; }
.chars li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.chars .info { flex: 1 1 160px; min-width: 0; }
.chars .name { font-weight: 600; overflow-wrap: anywhere; }
.chars .meta { color: var(--muted); font-size: 13px; }
.chars .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chars .confirm { flex: 1 1 100%; margin: 0; font-size: 14px; }

.choice { display: flex; gap: 6px; margin-top: 4px; }
.choice button { flex: 1; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: rgba(255,255,255,.06); color: var(--ink); font-weight: 600; }
.choice button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); }

/* ---------------- the 3D view (src/game/play.js), full screen over the page; from walkthrough/style.css */
.play { position: fixed; inset: 0; z-index: 10; overflow: hidden; background: #0e1424; }
.play .game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
.play kbd { font: 600 0.8em var(--font); padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.08); }
.play .overlay { position: absolute; inset: 0; display: none; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at center, rgba(14,20,36,.55), rgba(14,20,36,.85)); }
.play[data-state="loading"] .start, .play[data-state="start"] .start, .play[data-state="error"] .start,
.play[data-state="paused"] .pause, .play[data-state="fallen"] .fallen, .play[data-state="teleport"] .teleport,
.play[data-state="map"] .map { display: grid; }
.play .fallen { background: none; }                       /* the screen is already dark (.dim) */
.play .fallen p { margin: 0 0 18px; }
.play .card { width: min(360px, 100%); text-align: center; }
.play .card.small { width: min(300px, 100%); }
.play .progress { --p: 0; height: 4px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
.play .progress span { display: block; height: 100%; width: calc(var(--p) * 100%); background: var(--blue); transition: width .2s; }
.play .start.ready .progress, .play .start.ready .status { display: none; }
.play .start.ready .status.measured { display: block; }    /* ?measure: what the visit took to be ready */
.play .status { margin: 10px 0 16px; color: var(--muted); font-size: 13px; }
.play .start.error .status { color: #ffc2c2; line-height: 1.5; }
.play .start.error .progress, .play .start.error .enter { display: none; }
.play .enter, .play .resume { width: 100%; padding: 12px 16px; border: 0; border-radius: 10px; background: var(--blue); color: #fff;
  font-weight: 600; font-size: 16px; }
.play .enter:disabled { opacity: .45; cursor: progress; }
.play .enter:not(:disabled):hover, .play .resume:hover { filter: brightness(1.1); }
.play .quit { width: 100%; margin-top: 10px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(255,255,255,.06); color: var(--ink); font-weight: 600; font-size: 15px; }
.play .quit:hover { background: rgba(255,255,255,.12); }
.play .pick { display: flex; gap: 6px; margin: 0 0 14px; }
.play .pick button { flex: 1; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: rgba(255,255,255,.06); color: var(--ink); font-weight: 600; }
.play .pick button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); }
/* the way out, always there, over the cards too (even while the site loads) */
.play .leave { position: absolute; z-index: 1; left: 16px; bottom: 16px; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); font-weight: 600; font-size: 13px; }
.play .leave:hover { background: rgba(14,20,36,.95); }

/* HUD */
.play .hud { position: absolute; inset: 0; pointer-events: none; display: none; }
.play[data-state="play"] .hud { display: block; }
.play .place { position: absolute; top: 16px; left: 16px; padding: 8px 14px; border-radius: 999px; background: var(--panel);
  border: 1px solid var(--line); font-weight: 600; font-size: 15px; backdrop-filter: blur(8px); }
.play .clock { position: absolute; top: 16px; right: 16px; width: 180px; padding: 3px 8px;
  border-radius: 8px; text-align: center; background: var(--panel); border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; backdrop-filter: blur(8px); }
.play .clock span { display: block; white-space: nowrap; }
.play .clock span:first-child { font-size: 11px; line-height: 14px; opacity: .8; }
.play .clock span:last-child { font-size: 17px; line-height: 20px; font-weight: 600; }
.play .minimap { position: absolute; top: 64px; right: 16px; width: 180px; height: 180px; border-radius: 50%;
  background: rgba(14,20,36,.82); border: 2px solid rgba(255,255,255,.25); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
/* near a lift, its gauge (where the car is) stands left of the minimap */
.play .liftgauge { position: absolute; top: 64px; right: 204px; width: 36px; height: 180px; border-radius: 8px;
  background: rgba(14,20,36,.82); border: 2px solid rgba(255,255,255,.25); box-shadow: 0 8px 24px rgba(0,0,0,.35);
  box-sizing: border-box; }
.play .liftgauge[hidden] { display: none; }
/* in a lift's car, its buttons' panel */
.play .lift { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); pointer-events: auto; display: grid;
  gap: 6px; padding: 10px; border-radius: 12px; background: rgba(150,152,155,.92); border: 1px solid rgba(255,255,255,.4);
  box-shadow: 0 8px 24px rgba(0,0,0,.35); width: 132px; }
.play .lift[hidden] { display: none; }
.play .lift .lift-display { order: -1; text-align: center; font: 700 22px/1.2 ui-monospace, monospace; color: #ff3b30;
  background: #2a0d0d; border-radius: 6px; padding: 4px 0; }
.play .lift button { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px;
  border: 1px solid rgba(0,0,0,.25); background: #d9dadc; color: #1b1d22; font-weight: 600; font-size: 13px; }
.play .lift button.lit { box-shadow: 0 0 0 2px #39d353 inset; }
.play .lift button kbd { min-width: 1.6em; text-align: center; }
.play .coords { position: absolute; top: 252px; right: 16px; min-width: 180px; padding: 4px 8px;
  border-radius: 8px; text-align: center; background: var(--panel); border: 1px solid var(--line);
  font: 12px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre; backdrop-filter: blur(8px); }
/* the life points under the coordinates, the red flash of a hurt, the dark of the end */
.play .life { position: absolute; top: 280px; right: 16px; width: 180px; height: 8px; box-sizing: border-box;
  border-radius: 4px; background: var(--panel); border: 1px solid var(--line); overflow: hidden; }
.play .life span { display: block; height: 100%; width: 100%; background: #5fd38a; transition: width .3s; }
.play .life.low span { background: #ff6b5e; }
.play .hurt { position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at center, rgba(200,0,0,0) 40%, rgba(200,0,0,.55)); }
.play .hurt.on { animation: hurt .4s ease-out; }
@keyframes hurt { from { opacity: 1; } to { opacity: 0; } }
/* under water, from walkthrough/style.css: the edges darker, the view a little blurred, the light from the surface
   shimmering at the top */
.play .water { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: radial-gradient(ellipse at center, rgba(20,60,50,0) 30%, rgba(4,18,15,.7));
  -webkit-backdrop-filter: blur(1.2px); backdrop-filter: blur(1.2px); }
.play .water::before { content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(150,210,185,.22), rgba(150,210,185,0) 40%);
  animation: shimmer 2.6s ease-in-out infinite alternate; }
@keyframes shimmer { from { opacity: .45; } to { opacity: 1; } }
.play.underwater .water { opacity: 1; }
.play .dim { position: absolute; inset: 0; pointer-events: none; background: #000; opacity: 0; }
.play[data-state="dying"] .dim, .play[data-state="fallen"] .dim { opacity: .75; transition: opacity 1.5s; }
.play .act { position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); pointer-events: auto;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  font-weight: 600; font-size: 14px; backdrop-filter: blur(8px); }
.play .act[hidden] { display: none; }
.play .hint { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); padding: 6px 12px; border-radius: 8px;
  background: rgba(14,20,36,.6); color: var(--muted); font-size: 12px; width: max-content; max-width: calc(100% - 220px);
  text-align: center; }
.play[data-state="play"]:not([data-view="3"])::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px;
  margin: -3px; border-radius: 50%; background: rgba(255,255,255,.8); box-shadow: 0 0 0 1px rgba(0,0,0,.35); pointer-events: none; }
.play[data-view="3"] .v1, .play:not([data-view="3"]) .v3 { display: none; }
.play[data-view="3"][data-state="play"] .game { cursor: grab; }
.play[data-view="3"][data-state="play"] .game.dragging { cursor: grabbing; }

/* the phone's sticks (sticks.js): the left one floats in the lower-left zone, faint at rest in its place; the right
   one stays bottom-right, its knob yellow with a word when a tap would do more than jump; clear of the notch side
   and the rounded corners, and never scrolling, zooming or selecting the page */
.play .sticks { position: absolute; inset: 0; pointer-events: none; }
.play .sticks[hidden], .play:not([data-state="play"]) .sticks { display: none; }
.play .sticks .move-zone { position: absolute; left: 0; bottom: 0; width: 45%; height: 65%; pointer-events: auto; }
.play .sticks .move-zone, .play .sticks .stick { touch-action: none; user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none; }
.play .sticks .stick { position: fixed; width: 132px; height: 132px; border-radius: 50%;
  background: rgba(14,20,36,.45); border: 2px solid rgba(255,255,255,.25); display: grid; place-items: center; }
.play .sticks .move { left: calc(24px + env(safe-area-inset-left)); bottom: calc(24px + env(safe-area-inset-bottom));
  opacity: .45; pointer-events: none; }
.play .sticks .move.held { bottom: auto; transform: translate(-50%, -50%); opacity: 1; }
.play .sticks .aim { right: calc(24px + env(safe-area-inset-right)); bottom: calc(24px + env(safe-area-inset-bottom));
  pointer-events: auto; }
.play .sticks .knob { width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.75); display: grid;
  place-items: center; font: 700 11px/1.1 var(--font); color: #1b1d22; text-align: center; overflow-wrap: anywhere; }
.play .sticks .knob.hot { width: 64px; height: 64px; background: #ffd65a; box-shadow: 0 0 0 6px rgba(255,214,90,.35); }
/* the phone's ☰ menu (menu.js): its button top-left, a panel from the left over a dimmed view */
.play .burger { position: absolute; z-index: 3; top: calc(12px + env(safe-area-inset-top));
  left: calc(12px + env(safe-area-inset-left)); width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 22px; line-height: 1;
  touch-action: manipulation; }
.play:not([data-state="play"]) .burger { display: none; }
.play .menu-veil { position: absolute; inset: 0; z-index: 4; background: rgba(0,0,0,.35); }
.play .menu-veil[hidden] { display: none; }
.play .menu { position: absolute; left: 0; top: 0; bottom: 0; width: min(320px, 50%); overflow-y: auto;
  padding: calc(10px + env(safe-area-inset-top)) 14px calc(10px + env(safe-area-inset-bottom))
  calc(14px + env(safe-area-inset-left)); background: rgba(14,20,36,.94); border-right: 1px solid var(--line); }
.play .menu header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.play .menu .shut { border: 0; background: none; color: var(--ink); font-size: 20px; min-width: 44px; min-height: 44px; }
.play .menu ul { list-style: none; margin: 0; padding: 0; }
.play .menu li button { display: block; width: 100%; min-height: 44px; padding: 8px 6px; border: 0;
  border-bottom: 1px solid var(--line); background: none; color: var(--ink); font-size: 16px; text-align: left; }
/* the teleport's plan and the map, from walkthrough/style.css: a storey, then a point on it, or a look round */
.play .map-panel { width: min(1200px, 100%); height: min(760px, 100%); display: grid; grid-template-rows: auto auto 1fr;
  gap: 12px; padding: 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.play .map-panel header { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.play .map-panel header h2 { margin: 0; }
.play .map-panel header p { margin: 0; color: var(--muted); font-size: 13px; flex: 1; min-width: 200px; }
.play .map-panel .close { border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--ink); border-radius: 8px; padding: 6px 12px; }
.play .map-panel .levels { display: flex; flex-wrap: nowrap; gap: 6px; overflow: hidden; }   /* one line: lists when they would not fit */
.play .map-panel .levels[hidden] { display: none; }               /* a single storey: no choice to make */
.play .map-panel .levels button, .play .map-panel .levels select { flex: none; border: 1px solid var(--line); background: rgba(255,255,255,.06);
  color: var(--ink); border-radius: 999px; padding: 6px 14px; font-size: 14px; white-space: nowrap; }
/* a list as wide as its storeys' names, not a form's field (display, width, margin) */
.play .map-panel .levels select { display: block; width: auto; margin: 0; }
.play .map-panel .levels select option { color: var(--ink); }    /* on the forms' dark options */
.play .map-panel .levels button:hover, .play .map-panel .levels button[aria-pressed="true"], .play .map-panel .levels select:hover, .play .map-panel .levels select.on {
  background: var(--blue); border-color: var(--blue); }
.play .map-panel .plan { grid-row: 3; width: 100%; height: 100%; min-height: 0; border-radius: 10px; background: #0b1020; cursor: crosshair;
  touch-action: none; }                                   /* the plan's own pinch and drag, not the page's */
.play .map-panel .plan.dragging { cursor: grabbing; }
.play .map-panel .map-canvas { cursor: grab; }            /* only to look: no point to pick */
/* ?measure's frames per second, top-centre */
.play .fps { position: absolute; top: calc(4px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  padding: 2px 8px; border-radius: 6px; background: var(--panel); font: 12px/1.4 ui-monospace, monospace; }
.play .fps[hidden] { display: none; }
/* the toast and the network's notice */
.play .toast { position: absolute; left: 50%; top: 72px; transform: translateX(-50%); padding: 8px 14px; border-radius: 8px;
  background: var(--panel); border: 1px solid var(--line); font-size: 14px; }
.play .toast[hidden] { display: none; }
.play .net { position: absolute; left: 50%; top: 112px; transform: translateX(-50%); z-index: 2; padding: 8px 14px;
  border-radius: 8px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; }
.play .net[hidden] { display: none; }

/* chat: the log bottom-left over the way out, the line under it while typed (a phone's: at the end) */
.play .chat { position: absolute; left: 16px; bottom: 56px; width: min(440px, calc(100% - 32px)); display: none;
  flex-direction: column; gap: 6px; pointer-events: none; }
.play[data-state="play"] .chat { display: flex; }
.play .chat .log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px;
  max-height: 38vh; overflow: hidden; overscroll-behavior: contain; }
.play .chat.open .log { overflow-y: auto; pointer-events: auto; scrollbar-width: thin; }
.play .chat .log li { flex: none; }
.play .chat .panel, .play .chat .suggest { pointer-events: auto; margin: 0; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(14,20,36,.92); font-size: 14px; }
.play .chat .panel[hidden], .play .chat .suggest[hidden] { display: none; }
.play .chat .panel header { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 4px 12px;
  border-bottom: 1px solid var(--line); }
.play .chat .panel .shut { border: 0; background: none; color: var(--ink); font-size: 20px; line-height: 1;
  padding: 2px 8px; cursor: pointer; }
.play .chat .panel ul { list-style: none; margin: 0; padding: 4px 0; max-height: 30vh; overflow-y: auto; }
.play .chat .panel li { padding: 3px 12px; }
.play .chat .panel li:has(button) { padding: 0; }
.play .chat .panel li button { display: block; width: 100%; padding: 4px 12px; border: 0; background: none;
  color: #b9d3ff; font: inherit; text-align: left; cursor: pointer; }
.play .chat .panel li button:hover, .play .chat .panel li button:focus-visible { background: rgba(255,255,255,.08); }
.play .chat .suggest { list-style: none; padding: 4px 0; max-height: 30vh; overflow-y: auto; }
.play .chat .suggest li { padding: 3px 12px; color: var(--muted); cursor: pointer; }
.play .chat .suggest li b { color: var(--ink); font-weight: 600; }
.play .chat .suggest li[aria-selected="true"] { background: rgba(255,255,255,.12); }
.play .chat .log li { align-self: flex-start; max-width: 100%; padding: 4px 9px; border-radius: 8px;
  background: rgba(14,20,36,.62); font-size: 14px; line-height: 1.35; overflow-wrap: anywhere;
  transition: opacity .8s; }
.play .chat .log li b { font-weight: 600; color: #b9d3ff; }
.play .chat .log li.world b { color: #ffd59a; }
.play .chat .log li.whisper { font-style: italic; }
.play .chat .log li.whisper b { color: #e5b8ff; }
.play .chat .log li.notice { color: var(--muted); font-style: italic; }
.play .chat .log li.old { opacity: 0; }
.play .chat.open .log li.old { opacity: 1; }
.play .chat .say { display: flex; gap: 6px; pointer-events: auto; }
.play .chat .say[hidden] { display: none; }
.play .chat .say input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(14,20,36,.88); color: var(--ink); font: 16px var(--font); }
.play .chat .scope { flex: none; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255,255,255,.08); color: var(--ink); font-weight: 600; font-size: 13px; }
.play .chat .scope[data-mode="world"] { background: #8a5a12; border-color: #8a5a12; }
.play .chat .scope[data-mode="whisper"] { background: #6a3a8a; border-color: #6a3a8a; max-width: 45%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* the hint wraps on two or three lines there: the log goes over it */
@media (min-width: 601px) and (max-width: 1100px) { .play:not(.phone) .chat { bottom: 100px; } }

@media (max-width: 600px) {
  .play .clock { width: 120px; padding: 3px 2px; }
  .play .clock span:first-child { font-size: 10px; line-height: 12px; }
  .play .clock span:last-child { font-size: 14px; line-height: 16px; }
  .play .minimap { top: 58px; width: 120px; height: 120px; }
  .play .liftgauge { top: 58px; height: 120px; right: 144px; }
  .play .coords { top: 186px; min-width: 120px; font-size: 10px; }
  .play .life { top: 208px; width: 120px; }
  .play .hint { display: none; }
}

/* The phone's screen (docs/superpowers/specs/2026-10-23-phone-version-design.md), upright or sideways: ☰ and the life
   bar top-left, the chat's last lines under them; the minimap top-right, smaller, the place's name under it; the
   sticks along the bottom. No clock, coordinates, keys' hint, Quitter (in ☰) nor door button (a tap on the right
   stick). All of it inside the notch's and the rounded corners' margins. */
.play.phone .clock, .play.phone .coords, .play.phone .hint, .play.phone .leave, .play.phone .act { display: none; }
/* nothing zooms, scrolls or selects the page: the view keeps every touch (drag-to-look), a button no double-tap zoom */
.play.phone { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.play.phone input { user-select: text; -webkit-user-select: text; }   /* iOS would refuse the chat's typing otherwise */
.play.phone .game { touch-action: none; }
.play.phone button, .play.phone .chat .log { touch-action: manipulation; }
.play.phone .life { top: calc(30px + env(safe-area-inset-top)); left: calc(68px + env(safe-area-inset-left));
  right: auto; width: 90px; }
.play.phone .minimap { top: calc(12px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right));
  width: 96px; height: 96px; }
.play.phone .liftgauge { top: calc(12px + env(safe-area-inset-top)); right: calc(116px + env(safe-area-inset-right));
  height: 96px; }
.play.phone .place { top: calc(116px + env(safe-area-inset-top)); left: auto;
  right: calc(12px + env(safe-area-inset-right)); max-width: 45%; padding: 5px 10px; font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the lift's buttons above the right stick (sideways: beside it), scrolling when the storeys outnumber the room */
.play.phone .lift { top: auto; transform: none; right: calc(12px + env(safe-area-inset-right));
  bottom: calc(180px + env(safe-area-inset-bottom)); overflow-y: auto;
  max-height: calc(100% - 330px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
@media (orientation: landscape) {
  .play.phone .lift { right: calc(172px + env(safe-area-inset-right)); bottom: calc(24px + env(safe-area-inset-bottom));
    max-height: calc(100% - 84px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
}
@media (orientation: portrait) { .play .menu { width: min(320px, 85%); } }
/* the phone's chat: its last three lines under ☰, a tap on them opening it over the whole view (chat.js fits it above
   the keyboard), a header with ✕ to close it; the toasts and the network's notice above the sticks, clear of it */
.play .chat .chat-head { display: none; }
.play.phone .chat { top: calc(64px + env(safe-area-inset-top)); bottom: auto; left: calc(12px + env(safe-area-inset-left));
  width: min(320px, calc(100% - 140px)); z-index: 2; }
.play.phone .chat:not(.open) .log li:not(.old) { pointer-events: auto; }   /* a faded line takes no tap */
.play.phone .chat:not(.open) .log li:not(:nth-last-child(-n+3)) { display: none; }
.play.phone .chat.open { position: fixed; inset: 0; width: auto; z-index: 5; gap: 8px; background: rgba(14,20,36,.95);
  padding: calc(6px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right))
  calc(8px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left)); }
.play.phone .chat.open .chat-head { display: flex; align-items: center; justify-content: space-between;
  pointer-events: auto; }
.play.phone .chat .chat-head .shut { border: 0; background: none; color: var(--ink); font-size: 20px; min-width: 44px;
  min-height: 44px; }
.play.phone .chat.open .log { flex: 1; max-height: none; }
.play.phone .chat.open .log li:first-child { margin-top: auto; }   /* the lines down by the one typed */
.play.phone .toast { top: auto; bottom: calc(180px + env(safe-area-inset-bottom)); }
.play.phone .net { top: auto; bottom: calc(230px + env(safe-area-inset-bottom)); }
