Style guide
Judge this at minimum screen brightness. That is the room it ships into.
Luminance
Attention is luminance, not decoration. Exactly one module is lit at a time.
Lit
Act on this now.
Dim
Live, but not your job.
Closed
Resolved, or dead.
Motion
The console boots: 4px of settle, 60ms apart. Replay it: it only runs on mount.
Mafia
One
Arrives first. The state band answers where am I.
Two
Then the register answers who is here.
Three
Then everything else, in the order it is read.
A single Reveal can be placed by hand when a screen is not a stack of modules.
Glyphs
One frame, one mark. Every role is a row on the same register.
plain
strike
cross
lens
An unknown name falls back to the plain frame, so a role added later can never render nothing:
name="godfather-not-a-real-glyph"
Color
Three accents, each with exactly one job.
void
#08090A
panel
#101114
panel-lit
#191B1F
rule
#26282D
signal
#F2EFE9
signal-2
#8C9096
signal-3
#55585E
alarm
#E5484D
alarm-deep
#8E1F23
secret
#E8B33A
safe
#4BC28E
Type: one family, three widths
Width is a token. Narrow means a fact; wide means the world changed.
t-state
wdth 125 · wght 700 · 44px
Night 02
t-state-sm
wdth 125 · wght 700 · 26px
Town wins
t-title
wdth 112 · wght 600 · 20px
The village sleeps
t-data
wdth 75 · wght 500 · tabular
t-code
wdth 75 · wght 700 · 34px
XKQ2
t-prose
wdth 100 · wght 400 · 16px
The Doctor may save the same person twice, but never themselves.
t-spoken
the app's voice, said out loud
Mafia, open your eyes. Choose someone to kill.
StateBand
The only element that shifts the console's accent.
Console state
Night 02
Everyone but the Mafia is asleep.
Roster
Dead players stay on the register, at closed luminance.
Register
RosterRow variants
Directive
Normally the one lit module. The spoken line comes from the role registry.
Mafia awake
Mafia, open your eyes. Agree on someone, and point.
RoleModule
Faction is a bar, not a badge. Rendered from the real role registry.
Mafia
Mafia
Wakes first each night and agrees on one victim. Knows the other Mafia. Wins when the Mafia equal or outnumber everyone else.
Doctor
Town
Protects one person each night. A protected victim survives the Mafia's kill. May save the same person twice, but never themselves.
Detective
Town
Each night, learns whether one player is Mafia. Knowing is the easy part; being believed is not.
Villager
Town
No night action. Argues, votes, and is usually wrong.
Sealed
Press and hold. A tap is too easy to trigger.
JoinModule
The one deliberate break from the void ground.
Join
or enter code
XKQ2
Button
Four intents, two sizes.
RoleModule, selectable
onSelect makes a card tappable, so a reference screen can light one without breaking the one-lit rule.
Field
Two recipes. The label never leaves; a placeholder is not a label.
Everyone at the table sees this.
Four characters, printed under the QR.
No game with that code. Check it with the God.
Renders a textarea. Prose wraps.
Nothing to enter.
CommitButton
Two presses. The arming window drains visibly.
Rule
Engine: suggested setups
Straight from game-core. Mafia can never start at or above parity.
Balance table
Players
Setup
Night order
kill
protect
investigate
CaseRecord
A closed record, filed.
Players
9Ended
Night 4Ran
47 minWhere
Kevin's flatPriya convinced the table to lynch the Doctor on day two. It never recovered.
CaseRecord, selectable
onSelect opens the dossier. Lit while chosen, so the archive list keeps one lit.
The top reports. The bottom acts.