# card
Two cards laid over play: a district's rule card (how this district plays: its eyes,
```
its roads, its cover, its ways out, and what colour opens) and a decision (a mission or a job asking which way).
local Card = require("~.screens.card")
local tree = Card.rules(data, env) -- data: Present.ruleCard(district, t) + { close = string }
local tree = Card.decision(data, env) -- data: Present.decision(objective, t) + { selected = index, timer = { left, duration }? }
local tree = Card.subtitle(data, env) -- data: Present.subtitle(line, t, settings); a line of speech at the bottom
env: { frame, text, glyph }
Callback ids (through modules.app, where the rule card is the screen "rules"): "rules:back";
"decision:<optionId>" (the app's confirm sends the selected one).
The rule card is shown the first time a district is entered and from the map; the decision holds the mission
until one option is chosen (it cannot be closed).
```
The interface is documented in the header of `init.luau`; this file repeats it for the asset browser.
# theme
Resolves the token table and hands the result to the engine's theme system.
```
Screens never write a colour or a size: they ask for a token. `Theme.t("paper")` is the resolved value;
`Theme.style("label.display", { fontSize = 20 })` is a resolved class with overrides laid on top, ready to be a
node's `style`. Both work without the engine (the test suite runs them), and the same resolved theme is what
`Theme.register()` gives the engine so that `classes` on a node and the default chrome agree with it.
local Theme = require("~.modules.theme")
Theme.t("state-pursuit") -- "#C8463C"
Theme.n("space-4") -- 16 (a number token; errors if it is not a number)
Theme.style(".paper", { padding = 8 }) -- { background = "#F6F1E4", padding = 8 }
Theme.state(state) -- the colour of an attention state ("clear", "pursuit", ...)
Theme.pigment(id) -- the colour of a pigment id, or the ink colour when unknown
Theme.register() -- engine: ui.registerTheme + ui.defineStyles (call once, in awake)
Theme.resolve(tokens, styles) -- the pure resolver: returns tokens, styles or nil, nil, error
```
The interface is documented in the header of `init.luau`; this file repeats it for the asset browser.
# pages
The pause menu's pages that are lists: the activity board, people and trust, the
```
named Wardens, garages, the impound, and what the city remembers. One layout (a title, a paper sheet of rows, a
detail card for the selected row at two columns), six row painters.
local Pages = require("~.screens.pages")
Pages.board(data, env) -- data: Present.board(rows, t) + { selected }
Pages.crew(data, env) -- data: Present.crew(rows, t) + { selected }
Pages.roster(data, env) -- data: Present.roster(rows, t) + { selected }
Pages.garages(data, env) -- data: Present.garages(rows, t) + { selected, said? }
Pages.impound(data, env) -- data: Present.impound(items, t) + { selected }
Pages.journal(data, env) -- data: Present.journal(memories, headline, t)
Every data table may carry `labels = { back, confirm? }`. env: { frame, text, glyph }.
Callback ids: "<page>:<rowId>" for a row (the app's confirm sends the selected one) and "<page>:back".
```
The interface is documented in the header of `init.luau`; this file repeats it for the asset browser.
# wheel
The arms wheel: every arm she owns round a ring, the pigments she carries on the
```
inner ring, and in the middle what the highlighted choice does. Held open; the world runs at a quarter speed.
local Wheel = require("~.screens.wheel")
local tree = Wheel.build(data, env)
data: Present.wheel(view, t) plus what the host tracks while it is open:
{ title, armsTitle, pigmentsTitle, empty,
arms = { { id, name, card, selected, usable, why?, shots } },
pigments = { { id, name, property, hex, pattern?, tins, selected } },
ring = "arms" | "pigments", -- which ring the stick or pointer is on
hover = id?, -- the segment under it (defaults to the selected one)
slots = number? } -- arm slots to draw (empty ones show as outlines); default 6
env: { frame, text, glyph, patterns? }
Callback ids: "wheel:arm:<id>", "wheel:pigment:<id>" (hover and click), "wheel:close".
Segments sit at fixed clock positions from 12 o'clock, so an arm is always in the same place: the wheel is
learnt by direction, not read.
```
The interface is documented in the header of `init.luau`; this file repeats it for the asset browser.
# settings
Settings: four tabs, rows of sliders, switches and choices.
```
local Settings = require("~.screens.settings")
local tree = Settings.build(data, env)
data: { title, tabs = { { id, label } }, tab = id, selected = rowIndex,
rows = { { id, label, kind = "slider" | "toggle" | "choice", value, min?, max?, step?,
options = { { id, label } }?, help? } },
labels = { on, off, reset, back, nextTab } }
env: { frame, text, glyph }
Callback ids: "settings:tab:<id>", "settings:set:<rowId>" (a slider's onChange; data.value is the new number),
"settings:toggle:<rowId>", "settings:choice:<rowId>:<optionId>", "settings:reset", "settings:back".
With keys or a pad the selected row is highlighted and left/right change it (the app turns `navigate` into the
same callbacks), so every setting is reachable on every device.
```
The interface is documented in the header of `init.luau`; this file repeats it for the asset browser.
# title
The title screen: the name painted across the city at dawn.
```
local Title = require("~.screens.title")
local tree = Title.build(data, env)
data: { title = "Painted Metropolis", city, line, items = { { id, label, note?, disabled? } }, selected,
warn = string? } -- callback ids are "title:<id>"
env: { frame, text, glyph }
The scene behind is the live city (the host parks a camera over the Meadow); the left third is shaded so the
name and the menu read over a bright sky. The title is two words: the first carries three strokes of paint.
Events: "title:continue", "title:new", "title:settings", "title:quit".
```
The interface is documented in the header of `init.luau`; this file repeats it for the asset browser.
# caught
Being caught, stage by stage, in step with pursuitKit's arrest sequence.
```
local Caught = require("~.screens.caught")
local tree = Caught.build(data, env)
data: { stage = "grabbed" | "restrained" | "itemised" | "transport" | "released",
progress = 0..1, -- through the stage
held = { title, prompt, breakable, breakProgress, charges, control = "use" }, -- grabbed
title, by, -- restrained and after: "Caught", "Old Quay post, 02:40"
billTitle, lines = { { icon, text, amount?, tone? } }, -- itemised: what it cost
keptTitle, kept = { { icon, text } }, note = string?, -- itemised: what you kept
canSkip, skipLabel, skipControl = "use", released = string?,
actions = { { id, control, label } }? } -- released: "caught:retry", "caught:walk"
env: { frame, text, glyph }
What each stage shows, so the moment is never a number appearing from nowhere:
grabbed the screen's edges close in; "Held"; the break-free prompt with its hold meter if there is a slip left
restrained two black bars (the camera has cut to the arrest); the word "Caught"; where and when
itemised the bill on paper, one line at a time: what was taken, then what was kept
transport everything fades to night
released one line: where you are let go; a failed mission's choices
```
The interface is documented in the header of `init.luau`; this file repeats it for the asset browser.
# layout
How the screens hold at other sizes. Pure.
```
The engine lays UI out on a canvas 1280 points wide whatever the window; its height follows the aspect
(720 at 16:9, 960 at 4:3, 548 at 21:9, and a phone held upright is about 410 wide). Every screen here is
anchored to edges with left/top/right/bottom, never to absolute positions, so the only decisions that depend
on size are made in one place:
local Layout = require("~.modules.layout")
local f = Layout.frame({ width = 1280, height = 720 }, safeArea?)
f.width, f.height
f.margin -- distance the HUD keeps from every edge (plus the safe area's insets)
f.left, f.top, f.right, f.bottom -- margin + inset per side
f.class -- "wide" (>= 1000 wide and >= 620 high) | "short" (wide but under 620 high) | "narrow"
f.columns -- 2 where a menu can show its side panel, 1 where it cannot
f.scale -- text scale for the class: 1, 0.9 (short) or 0.85 (narrow)
f.mapSize -- side of the square the map screen draws in
Layout.size(f, n) -- a font size or length scaled for the frame, rounded
```
The interface is documented in the header of `init.luau`; this file repeats it for the asset browser.
# shop
a counter: what is for sale, what it costs, and what you have to pay with.
local Shop = require("~.screens.shop")
local tree = Shop.build(data, env)
data: { title, kicker = string?, -- the shop's name; who keeps it or what hour it is
items = { { id, label, note?, disabled?, about?, price?, swatch = "#hex"? } }, selected,
purse = { sous, renown, rankName },
carried = { { name, hex, tins } }, room = string?, -- what is in the satchel, and the room left
said = string?, -- the last thing that happened ("6 tins of Ochre. 24 sous.")
labels = { buy, back, carried } }
env: { frame, text, glyph }
Callback ids are "shop:<id>" for a row and "shop:back". A row is bought with the menu's confirm; the list
is the same W.menu every menu uses, so it answers the pointer too.
# prompts
What to draw for "press this": read from the input system, never typed in.
```
A prompt names a CONTROL ("interact", "paint"), not a key. This module finds the control's binding for the
device class in use and turns it into a glyph: a short text for a keycap ("E", "Shift"), an icon name for a
mouse button, or the connected pad's own legend for a pad button ("A" on one pad, "Cross" on another).
local Prompts = require("~.modules.prompts")
Prompts.glyph({ kind = "key", code = "KeyE" }) -- { text = "E" } (pure)
Prompts.glyph({ kind = "mouse", button = "left" }) -- { icon = "mouseLeft" }
Prompts.glyph({ kind = "padButton", button = "south" }, label) -- { text = label("south"), round = true }
Prompts.keyName("ShiftLeft") -- "Shift"
Prompts.forControl("interact", "kbm") -- engine: the glyph of a live control for a class, or nil
Prompts.prefer({ "painter", "menu" }) -- which maps' controls are meant when a name is live in several
Prompts.class() -- engine: "gamepad" when a pad is connected and was used last,
-- else "kbm"; the host may override with Prompts.setClass(c)
forControl and class call the engine's zinput module (Zin.scheme.entriesFor, Zin.scheme.classBindings,
Zin.scheme.drivingClass, Zin.gamepad.label, Zin.gamepad.count). NOT YET RUN IN THE ENGINE.
```
The interface is documented in the header of `init.luau`; this file repeats it for the asset browser.
# map
The map: the city plan drawn in paper and paint, and what each district is worth.
```
local Map = require("~.screens.map")
local tree = Map.build(data, env)
data: { title, size, -- size: the side of the map square (Layout.frame().mapSize)
base = svg string, overlay = svg string, -- from mapModel:base(...) and mapModel:overlay(...)
districts = { { id, name, rule, colour, vigilance, vigilanceName, painted, signed, total, hue } },
focus = districtId?, -- the district the player stands in (its row is marked)
legend = { { icon, label, color? } },
summary = string?, -- "14 of 61 walls signed"
labels = { colour, vigilance, painted, back } }
env: { frame, text, glyph }
Callback ids: "map:district:<id>" (a row was chosen), "map:back".
The base drawing is the expensive part: the app builds it when the map opens and when a district's colour
changes, and only the overlay while it is open.
```
The interface is documented in the header of `init.luau`; this file repeats it for the asset browser.
# mission
The card a mission begins with, and the one it ends with.
```
local Mission = require("~.screens.mission")
local tree = Mission.build(data, env)
data: { mode = "start" | "done" | "failed",
kicker = string, -- start: the giver's name; done: "Done"; failed: "It did not come off"
title, body, -- the mission's title; its brief, its closing line or its failing line
about = string?, -- start: who the giver is
rewardsLabel = string?, rewards = { { icon, text, color? } },
actions = { { id, control, label } } } -- callback ids "mission:<id>"; `control` names the input
env: { frame, text, glyph }
Events: start: "mission:accept", "mission:later"; done: "mission:continue"; failed: "mission:retry",
"mission:walk".
The card is paper for a beginning and an ending, and takes the colour of what happened as one stroke of paint
across its head: saffron to begin, verdigris done, madder failed.
```
The interface is documented in the header of `init.luau`; this file repeats it for the asset browser.
# hud
The in-play HUD as a pure function of the game's view.
```
local Hud = require("~.screens.hud")
local tree = Hud.build(view, env)
view: what metropolisGame's game:view() returns (README, "HUD data contract"): paint, pursuit, money,
objective, mural, district, clock, scrubs, player; and two things the host adds from the scene:
aim = { hex, inRange, painting, hold = 0..1 }? the reticle on a wall (the tool's colour; the signing hold)
marks = { { x, y, kind, stage, value?, icon? } } screen points over watchers' heads (and places)
env: { frame = Layout.frame(...), text = function(key, vars) -> string, -- the game's copy
glyph = function(control) -> prompts glyph | nil, -- from the input system
prompts = { { control, text, hold? } }, -- what the player can do here, most important first
notes = { { id, icon, text, tone, age } }, -- notifications, newest last
banner = { name, rule, line, colour, age } | nil, -- district banner while it shows
patterns = false } -- pigment patterns on
Regions and what each answers:
top left attention am I being watched, by how much, and what happens next
top centre compass who is watching and where they are
top right purse sous, renown, rank, the hour
right objective what the mission wants now; scrub crews on their way
bottom left paint tool, colours and how much of each, room in the satchel
bottom centre the wall coverage, accuracy and tier of the wall under the reticle; what a control does here
bottom right notes things that just happened
Every region is anchored to its edge, so the HUD holds at any size; at "narrow" and "short" frames the
objective and notes shrink and the compass narrows (see Layout).
```
The interface is documented in the header of `init.luau`; this file repeats it for the asset browser.
# escaped
The three seconds after a search runs out.
```
local Escaped = require("~.screens.escaped")
local tree = Escaped.build(data, env)
data: { title, sub, levelName, renown = number, renownText = string, age = seconds since it appeared,
seconds = how long it stays }
env: { frame, text, glyph }
No input: it is a band of paper across the lower third that slides in, says what you got away from and what
that was worth, and leaves. The street stays visible and playable under it.
```
The interface is documented in the header of `init.luau`; this file repeats it for the asset browser.
# pause
The pause menu: the street held still behind indigo, and where you stand.
```
local Pause = require("~.screens.pause")
local tree = Pause.build(data, env)
data: { title, items = { { id, label, note? } }, selected, -- callback ids are "pause:<id>"
summary = { district = { name, rule, colour, vigilanceName }?, sous, renown, rankName, clockText,
phaseName, objective = { title, text }?, saved = string? },
labels = { colour, vigilance } }
env: { frame, text, glyph }
Events (through the app): "pause:resume", "pause:map", "pause:settings", "pause:saveQuit".
```
The interface is documented in the header of `init.luau`; this file repeats it for the asset browser.
# metropolisUi
The interface of Painted Metropolis: an in-play HUD and eighteen screens with one identity, cut paper and wet
paint over a painted city. Tokens and classes in one theme, a designed icon set, prompts read from the input
system, layouts anchored to edges so they hold at other sizes. Screens are pure functions of their data; view
models (`modules.present`) turn the game's views (ids, numbers, catalog keys) into that data with the engine's
translator, so no screen and no rule holds a sentence.
**Status:** the pure parts (theme, view models, settings, map model, every screen's tree at several sizes) are
covered by case modules that run in the engine's Luau VM in edit mode. NOTHING has been drawn on screen from
this package in this build: `modules.app` (the only module that calls `ui.*`) and `MetropolisUi.component`
have not been run, and no capture exists. How the first eight screens look is shown by static HTML mock-ups in
`D:/AgentStorage/artifacts/painted-metropolis/ui/` (mock-ups, not captures); the screens added for the full
game (wheel, rule card, decision, the list pages, subtitles) have no mock-up.
## Identity
- **Surfaces**: warm paper with a torn edge (`W.paper`, clip-path + a soft lift) carries what you read in play;
indigo night (`W.night`, scrims) carries menus and the mission layer. Nothing is a glass panel.
- **Colour**: only the game's eight pigments. Each attention state owns one (`state-clear` verdigris,
`state-noticed` saffron, `state-reported` amber, `state-pursuit` madder, `state-search` cobalt,
`state-escaped` meadow green), used for the state disc, its meter and the compass ticks.
- **Type** (bundled engine fonts): **Anton** for anything shouted (state names, titles, numbers),
**Bricolage Grotesque** for anything read, **Gelasio italic** for anyone speaking (briefs, twists, the lines
under a district's name).
- **Icons**: sixty 24 x 24 stencil marks in `modules/icons` (SVG, two colours), and eight pattern marks so
pigments can be told apart without colour.
- **Motion**: decided once, in `Tokens.motion` (nine named specs: `enter`, `leave`, `meter`, `select`, `pulse`,
`flash`, `drain`, `wheel`, `stamp`, each a duration, an easing and what it is for). Screens ask
`Theme.motion(name)`. No idle animation in play except the pulse while watched or hunted. With "reduce motion"
on, every duration is 0 except the two that carry information (`meter`, `drain`).
- **Reading and seeing** (`modules.settings`, tab "access"): four text sizes (every `text-*` token scales), a
colour-blind safe palette for the pigments (Okabe-Ito hues, `Tokens.safe`) with pattern marks on tins,
subtitles with speaker names and a backing, reduced motion, and the greywash effect as a meter only.
- **Reading over any scene**: text never sits on the scene without paper under it, except the district banner
and context prompts, which use `text-on-scene` (paper-coloured text with a two-layer indigo shadow).
## Modules
| `require("metropolisUi.<path>")` | What it is | Engine calls |
|-|-|-|
| `modules.tokens` | the token table and style classes (data) | none |
| `modules.theme` | resolves `$token` references; `Theme.t`, `Theme.style`; `Theme.register()` | `ui.registerTheme`, `ui.defineStyles` |
| `modules.icons` | the icon set; `Icons.svg`, `Icons.node`, `Icons.pattern` | none |
| `modules.widgets` | paper, night, text, meter, pips, key, prompt, menu, footer, entrance, pulse | none |
| `modules.format` | counts, timers, tins, percentages, compass positions | none |
| `modules.layout` | `Layout.frame(size, safeArea)`: class, margins, columns, map size | none |
| `modules.prompts` | glyphs for controls: `glyph`, `keyName` (pure); `forControl`, `class` (engine) | `Zin.scheme.*`, `Zin.gamepad.*` |
| `modules.mapModel` | the city map as SVG: `fromPlan` (a cityGen plan record: district outlines, ways by class, the shore), `base`, `overlay` (markers, search area, road blocks ordered and standing, the forecast, a route, a marker), `labels`, `point` | none |
| `modules.present` | the view models: `hud`, `wheel`, `ruleCard`, `decision`, `board`, `crew`, `roster`, `garages`, `impound`, `shop`, `journal`, `bill`, `subtitle`, each `(data, t) -> screen data` | none |
| `modules.settings` | settings as data: tabs, defaults, `rows`, `set`, `rebind` (a key in use swaps), `apply` (onto the theme; returns what the host applies) | none |
| `modules.app` | owns the engine screens; `mount`, `setHud`, `show` / `update` / `hide`, `notify`, `banner`, `input`, `on`, `tick` | `ui.*` |
| `screens.*` | `build(data, env) -> tree` for hud, pause, map, mission, caught, escaped, title, settings, shop, wheel; `card` (`rules`, `decision`, `subtitle`); `pages` (`board`, `crew`, `roster`, `garages`, `impound`, `journal`) | none |
| `MetropolisUi.component` | the persistent owner: forwards `onCallback`, ticks the app (also while paused) | component hooks |
| `tests/cases/{core,game}` | case modules for everything marked "none" above (run in-process with `caseBench`; `tests/metropolisUi.testSuite` registers them for the engine's runner) | |
## Screens, data contracts and events
`env` for every screen is `{ frame, text(key, vars), glyph(control) }`; the app supplies it. `text` is the
engine's translator (`i18n.t`); keys are `pm_ui.*` and the game's other catalogs.
| Screen | Data it takes | Actions it emits (through `App.on`) |
|-|-|-|
| `hud` | `Present.hud(game:view(id), t)`: `arms { id, name, shotsText, pigment { hex, property }, cooling, refused? }?`, `colour { value, state, label, effect }?`, `target { name, icon, parts { name, value }[], out, outText? }?`, `vehicle { name, speed, status, tone, plate, stock? }?`, `paint { tool { id, name }, pigments { id, name, hex, pattern, tins, selected }[], total, capacity, refused? }`, `pursuit { state, stateName, hint?, level, levelName, heat, timer { left, duration }?, watchers { id, kind, value, stage, bearing }[], grab { by, progress }?, described[], strikes }`, `money { sous, renown, rankName, fraction }`, `objective { title, text, step, count, timer?, twist? }?`, `mural { name, coverage, accuracy, overspray, tier, tierName, signed }?`, `clock { text, phase, phaseName }`, `scrubs { name, state, startsIn }[]`, `player { yaw }`; plus `prompts { control, text, hold? }[]`, notifications and the banner from the app | none (the HUD has no widgets that take input) |
| `pause` | `title, items[], selected, summary { district?, sous, renown, rankName, clockText, phaseName, objective?, saved? }, labels` | `pause:resume`, `pause:map`, `pause:settings`, `pause:saveQuit`, `pause:back` |
| `map` | `title, size, base, overlay` (SVG from `mapModel`), `districts { id, name, rule, colour, vigilance, painted, signed, total, hue }[], focus, legend[], summary, labels` | `map:district:<id>`, `map:back` |
| `mission` | `mode` (start, done, failed), `kicker, title, body, about?, rewardsLabel?, rewards[], actions { id, control, label }[]` | `mission:accept`, `mission:later`, `mission:continue`, `mission:retry`, `mission:walk` |
| `caught` | `stage` (grabbed, restrained, itemised, transport, released), `progress, held { title, prompt, breakable, breakProgress, charges }, title, by, billTitle, lines { icon, text, amount?, tone? }[], keptTitle, kept[], note?, canSkip, skipLabel, released?, actions[]` | `caught:retry`, `caught:walk` |
| `escaped` | `title, sub, levelName, renownText, age, seconds` | none (it leaves by itself) |
| `title` | `title, city, line, items { id, label, note?, disabled? }[], selected, warn?` | `title:continue`, `title:new`, `title:settings`, `title:quit` |
| `settings` | `title, tabs[], tab, selected, rows { id, label, kind (slider, toggle, choice, key, action), value, min?, max?, options?, help?, glyph?, rebound? }[], rebinding?, labels` (rows from `Settings.rows`) | `settings:tab:<id>`, `settings:set:<row>` (`payload.value`), `settings:toggle:<row>`, `settings:choice:<row>:<option>`, `settings:nudge:<row>` (`payload.value` = -1 or 1, from keys or a pad), `settings:rebind:<action>`, `settings:action:<row>`, `settings:reset`, `settings:back` |
| `wheel` | `Present.wheel(view, t)` + `ring`, `hover`, `slots` | `wheel:arm:<id>`, `wheel:pigment:<id>` (hover and click) |
| `rules` | `Present.ruleCard(district, t)` + `close` | `rules:back` |
| `decision` | `Present.decision(view.objective, t)` + `selected`, `timer?` | `decision:<option>` |
| `subtitle` | `Present.subtitle(line, t, settings)` | none |
| `board`, `crew`, `roster`, `garage`, `impound`, `journal` | the matching `Present.*` + `selected`, `labels { back, confirm? }` | `<screen>:<rowId>`, `<screen>:back` |
The caught screen follows pursuitKit's `arrestStage` events one to one; the bill's lines are built by the game
from `Arrest.bill`'s `lines` (each `key` has copy under `caught.<key>`).
## Using it
```lua
local App = require("metropolisUi.modules.app")
local Present = require("metropolisUi.modules.present")
local Settings = require("metropolisUi.modules.settings")
local t = i18n.t
App.mount({ text = t, hosted = true }) -- with MetropolisUi.component on an entity in the scene
App.on(function(action, payload) ... end)
local host = Settings.apply(savedSettings, Theme) -- palette, text size, motion; returns volumes, look speed, bindings ...
-- the game's host interface `ui` (metropolisGame.interfaces) is this, per player:
ui.setHud = function(player, view) App.setHud(Present.hud(view, t, { wash = host.washEffect }), { prompts = promptsHere }) end
ui.show = function(player, screen, data) App.show(screen, data) end -- data already presented, e.g.
-- App.show("rules", Present.ruleCard(view.district, t))
-- App.show("board", Present.board(session.board:view(day, session:progress(), district), t, { district = district }))
-- App.show("caught", Present.bill(bill, t, view.clock.text))
ui.notify = function(player, note) App.notify({ icon = note.icon, tone = note.tone, text = t(note.key, note.values) }) end
ui.banner = function(player, d) App.banner(Present.ruleCard(d, t)) end
```
Menu controls come from the game's `menu.inputMap`: while `App.menuOpen()` the host keeps that map active and
calls `App.input("up" | "down" | "left" | "right" | "confirm" | "back" | "tabPrev" | "tabNext")` from its
handlers. Pointer and touch act on the widgets directly.
## Layout at other sizes
Everything is pinned with `left` / `top` / `right` / `bottom` from `Layout.frame`, which adds the safe area's
insets. Classes: `wide` (the 1280 point canvas at 620 points high or more), `short` (ultrawide: margins 20,
scale 0.9, a narrower compass and objective), `narrow` (under 1000 wide, a phone: margins 14, menus drop their
side panel, the map loses its district column). The cases build the HUD at 410 x 900, 1280 x 548, 1280 x 960,
1600 x 900 and 1024 x 640.
## The map
`MapModel.fromPlan(plan)` reads the baked cityGen record (`require("metropolis.verrane.cityPlan")`): district
outlines, the road graph's edges by class (`MapModel.WAYS`: highway to track, each a width, a least stroke, and
whether it shows on a sheet of the whole city), the shore, places. The frame is the engine's (+z south runs down
the sheet). A window (`MapModel.new(city, size, { view = ... })`) is the minimap or a zoomed sheet and draws
alleys, stairs and tram lines. The overlay takes what the game's view carries: `pursuit.search`, `pursuit.lkp`,
`pursuit.blocks`, and a forecast from `pursuitKit.roadblocks.plan` for the next heat level.