/* Untouch's own look, taken from its mark: five fingers as five capsules in five colours, and a
   lift. So everything you can touch is a capsule, nothing sits in a box (a part of a screen is
   a heading and what belongs to it, standing on the ground), the five colours always appear in
   finger order (thumb to little finger), a finger that is lifted means "look here", and what
   matters most is light on dark, like a fingertip on the screen. */
:root {
  --ground: #0b0f14; --palm: #19212b; --palm-up: #26313e; --line: #2b3644;
  --text: #f4f6f8; --soft: #a9b4c2; --ink: #0b0f14;
  --thumb: #f2a33a; --index: #4da3ff; --middle: #5fd38d; --ring: #c99bff; --little: #ff8fa3;
  --red: #ff6b6b;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--ground); color: var(--text);
  font: 17px/1.45 ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}
#app { position: relative; height: 100dvh; display: flex; flex-direction: column; max-width: 720px; margin: 0 auto;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }

h1 { font-size: 28px; line-height: 1.15; margin: 0; font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: 20px; line-height: 1.2; margin: 0; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0; color: var(--soft); }
p.soft { font-size: 14px; }
.error { color: var(--red); }
.busy { color: var(--thumb); }
label { display: block; color: var(--soft); font-size: 15px; margin: 0 0 6px 18px; }
input[type=text], textarea {
  width: 100%; background: var(--palm); color: var(--text); border: 2px solid transparent;
  border-radius: 26px; padding: 13px 18px; font: inherit;
}
input[type=text]:focus, textarea:focus { outline: none; border-color: var(--index); }
button:focus-visible { outline: 3px solid var(--index); outline-offset: 2px; }

/* Buttons are capsules. The one that matters is light, like a fingertip; the others are palm. */
button {
  font: inherit; font-weight: 700; color: var(--ink); background: var(--text); border: 0;
  border-radius: 999px; padding: 13px 22px; min-height: 50px; cursor: pointer;
  transition: transform .12s ease, background-color .12s ease;
}
button:active { transform: translateY(-2px); } /* a small lift */
button.quiet { background: var(--palm-up); color: var(--text); }
button.danger { background: var(--red); color: var(--ink); }
button:disabled { opacity: .5; }
button.with-icon { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
button.round { width: 48px; height: 48px; min-height: 48px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--text); flex: none; }
button.round.primary { background: var(--text); color: var(--ink); }
button.round.line { background: var(--palm-up); color: var(--text); }
svg.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* The first screens: who we are, joining, waiting. */
.center { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 28px 24px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.brand img { width: 76px; height: 76px; border-radius: 24px; }
.brand strong { display: block; font-size: 38px; line-height: 1; font-weight: 800; letter-spacing: -0.03em; }
.brand span { display: block; margin-top: 6px; color: var(--soft); font-size: 15px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.brand::after { content: none; }
.center > .fingers-line { width: 156px; height: 6px; }
.center h1 + p { font-size: 17px; }

/* The bar on top of every screen, underlined by the five fingers. */
header { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 16px 16px; }
header > .fingers-line { position: absolute; left: 16px; right: 16px; bottom: 4px; }

/* The five fingers as a line. Five boxes with a plain colour each: a browser draws a box on
   whole screen pixels, so the five are equally thick whatever the screen or the zoom. (Painted
   as one pattern they could land between pixels, and light colours then look thicker.) */
.fingers-line { display: flex; gap: 4px; height: 4px; flex: none; }
.fingers-line i { flex: 1; background: var(--thumb); }
.fingers-line i:nth-child(2) { background: var(--index); }
.fingers-line i:nth-child(3) { background: var(--middle); }
.fingers-line i:nth-child(4) { background: var(--ring); }
.fingers-line i:nth-child(5) { background: var(--little); }
header img { width: 40px; height: 40px; border-radius: 13px; }
header strong { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
header small { display: block; color: var(--soft); font-size: 13px; }
header .mark { margin-left: auto; text-align: right; }
header .mark strong { font-size: 17px; }
header .mark small { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
header .right { margin-left: auto; }
header.bar { gap: 4px; padding: 8px 12px 14px; }
header.bar img { margin: 4px 8px 4px 4px; }
header.bar strong { font-size: 21px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.notice { margin: 10px 16px 0; padding: 10px 10px 10px 18px; background: var(--palm); border-radius: 26px;
  display: flex; gap: 12px; align-items: center; justify-content: space-between; box-shadow: inset 5px 0 0 var(--thumb); }
.notice p { color: var(--text); font-size: 15px; }
.notice button { padding: 9px 16px; min-height: 40px; flex: none; }

/* The menu beside the conversation: a hand for a button, and a sheet on which every way out is
   a finger in its own colour. Opening it lifts the fingers of the hand, and the ways rise one
   after the other, the way fingers come up off the screen. */
.menu-button { width: 48px; height: 48px; min-height: 48px; padding: 0; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--palm-up); }
.menu-button .hand { height: 22px; gap: 3px; }
.menu-button .hand i { width: 4px; border-radius: 2px; transition: transform .38s cubic-bezier(.2, .9, .3, 1.5); }
.menu-button .hand i:nth-child(2) { transition-delay: .04s; }
.menu-button .hand i:nth-child(3) { transition-delay: .08s; }
.menu-button .hand i:nth-child(4) { transition-delay: .12s; }
.menu-button .hand i:nth-child(5) { transition-delay: .16s; }
/* Open, the hand stays above the shade: it is also the way to close the menu. */
.menu-button.open { position: relative; z-index: 7; background: var(--text); }
.menu-button.open .hand i { transform: translateY(-5px); }
/* What is hidden stays hidden, whatever layout its own rule gives it (the menu is a grid). */
[hidden] { display: none !important; }
.menu-shade { position: absolute; inset: 0; z-index: 5; background: rgba(5, 8, 12, .6); animation: shade .22s ease both; }
.menu-sheet { position: absolute; z-index: 6; top: 76px; left: 12px; right: 12px; max-width: 440px; margin-left: auto; display: grid; gap: 2px; padding: 10px;
  background: var(--palm); border-radius: 30px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); transform-origin: calc(100% - 26px) -20px; animation: sheet .3s cubic-bezier(.2, .9, .3, 1.12) both; }
.menu-way { --c: var(--thumb); display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 16px 10px 12px; text-align: left; background: transparent; color: var(--text);
  border-radius: 22px; animation: rise .46s cubic-bezier(.2, .9, .3, 1.35) both; animation-delay: calc(70ms + var(--i) * 60ms); }
.menu-way:nth-child(2) { --c: var(--index); }
.menu-way:nth-child(3) { --c: var(--middle); }
.menu-way:nth-child(4) { --c: var(--ring); }
.menu-way:nth-child(5) { --c: var(--little); }
.menu-way:last-child:not(:first-child) { --c: var(--little); }
.menu-way .finger-mark { flex: none; width: 10px; height: 42px; border-radius: 5px; background: var(--c); transition: transform .25s cubic-bezier(.2, .9, .3, 1.6); }
.menu-way svg { flex: none; width: 26px; height: 26px; color: var(--c); }
.menu-way strong { display: block; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.menu-way small { display: block; color: var(--soft); font-size: 13px; line-height: 1.3; font-weight: 400; }
/* The help is not one of the ways through this page, so it takes no finger colour. */
.menu-way.help:nth-child(n) { --c: var(--soft); }
.menu-way:hover, .menu-way:focus-visible { background: var(--palm-up); }
.menu-way:hover .finger-mark, .menu-way:focus-visible .finger-mark, .menu-way:active .finger-mark { transform: translateY(-7px); }
.menu-way:active { transform: none; }
@keyframes shade { from { opacity: 0; } }
@keyframes sheet { from { opacity: 0; transform: scale(.9) translateY(-10px); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* Waiting for the tablet: five fingers lifting one after the other, in the bar. */
.working { margin-left: auto; padding: 0 8px; visibility: hidden; }
.working.on { visibility: visible; }
.working .hand { height: 24px; gap: 3px; }
.working .hand i { width: 5px; border-radius: 3px; }
.working.on .hand i { animation: typing 1.2s infinite ease-in-out; }
.working .hand i:nth-child(2) { animation-delay: .15s; }
.working .hand i:nth-child(3) { animation-delay: .3s; }
.working .hand i:nth-child(4) { animation-delay: .45s; }
.working .hand i:nth-child(5) { animation-delay: .6s; }

/* A screen beside the conversation. */
.page { flex: 1; overflow-y: auto; padding: 18px 20px 28px; display: flex; flex-direction: column; gap: 30px; }
.stack { display: flex; flex-direction: column; gap: 30px; }
.part { display: grid; gap: 12px; }
.part h2 { font-size: 24px; }
.card { display: grid; gap: 12px; padding: 20px; border-radius: 28px; }
.choices { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.choices button { flex: 1 1 auto; min-height: 46px; padding: 8px 16px; }

/* His quick sentences: a numbered row each, the tile's words above what is said. */
.phrases { display: grid; gap: 14px; }
.phrase { display: flex; align-items: center; gap: 10px; }
.phrase > b { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--palm-up); font-size: 13px; }
.phrase:nth-child(-n+5) > b { background: var(--ring); color: var(--ink); }
.phrase .fields { flex: 1; min-width: 0; display: grid; gap: 6px; }
.phrase .fields input { padding: 9px 16px; }
.phrase .fields input:first-child { font-weight: 800; }
.phrase .moves { flex: none; display: grid; grid-template-columns: auto auto; gap: 4px; }
.phrase .moves button { width: 38px; height: 38px; min-height: 38px; }
.phrase .moves button:last-child { grid-column: span 2; justify-self: center; }

.troubles { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; color: var(--soft); }
.troubles li { padding-left: 12px; border-left: 3px solid var(--thumb); overflow-wrap: anywhere; }

.recovery { font-size: 24px; font-weight: 800; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; user-select: all; }

.my-face { width: 168px; height: 168px; margin: 4px auto; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--palm-up); color: var(--soft); }
.my-face img { width: 100%; height: 100%; object-fit: cover; }
.my-face svg { width: 84px; height: 84px; }
.stack.small { gap: 8px; }

/* Linking a computer: a code to type, large, and the same thing as a picture to scan. */
input.code { font-size: 26px; font-weight: 800; letter-spacing: 0.12em; text-align: center; text-transform: uppercase; }
.pairing { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.bigcode { font-size: 44px; font-weight: 800; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pairing .card.ticket { padding: 10px; width: 220px; }

/* An invitation: the code on a white card, signed with the name. */
.card.ticket { justify-items: center; text-align: center; gap: 6px; padding: 14px 14px 20px; background: #fff; color: var(--ink); }
.card.ticket strong { font-size: 18px; font-weight: 800; letter-spacing: -0.01em; margin-top: 2px; text-wrap: balance; }
.card.ticket p { color: #4a5563; }
.card.ticket .signed { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); }
.card.ticket .signed .fingers-line { width: 48px; gap: 2px; }
.qr { width: min(100%, 300px); }
.qr svg { display: block; width: 100%; height: auto; }

/* How the tablet is doing, as a hand resting on the screen: five fingers for five facts. A
   finger at rest is as it should be; a lifted, hollow finger asks for a look. */
.hand-state { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 10px; height: 214px; padding-bottom: 16px; margin-top: 6px; }
.hand-state::after { content: ""; position: absolute; left: 6%; right: 6%; bottom: 0; height: 6px; border-radius: 3px; background: var(--palm-up); }
.finger { width: 50px; border-radius: 25px; display: flex; justify-content: center; padding-top: 14px; color: var(--ink); background: var(--c); transition: transform .35s ease; }
.finger:nth-child(1), .fact:nth-child(1) { --c: var(--thumb); }
.finger:nth-child(2), .fact:nth-child(2) { --c: var(--index); }
.finger:nth-child(3), .fact:nth-child(3) { --c: var(--middle); }
.finger:nth-child(4), .fact:nth-child(4) { --c: var(--ring); }
.finger:nth-child(5), .fact:nth-child(5) { --c: var(--little); }
.finger:nth-child(1) { height: 48%; }
.finger:nth-child(2) { height: 80%; }
.finger:nth-child(3) { height: 88%; }
.finger:nth-child(4) { height: 82%; }
.finger:nth-child(5) { height: 62%; }
.finger.up { transform: translateY(-24px); background: transparent; color: var(--c); box-shadow: inset 0 0 0 3px var(--c); }
.verdict { text-align: center; font-size: 26px; margin-top: -14px; }
.facts { display: grid; margin-top: -16px; }
.fact { display: flex; align-items: center; gap: 12px; padding: 9px 2px; }
.fact i { flex: none; width: 6px; height: 20px; border-radius: 3px; background: var(--c); }
.fact.bad i { background: transparent; box-shadow: inset 0 0 0 2px var(--c); transform: translateY(-4px); }
.fact span { flex: 1; color: var(--soft); }
.fact strong { text-align: right; font-weight: 800; }
.fact.bad strong { color: var(--thumb); }
/* Facts that are not about a finger: green when well, amber and hollow when not. */
.fact.plain { --c: var(--middle); }
.fact.plain.bad { --c: var(--thumb); }

/* Choosing one of a few: capsules side by side, the chosen one light. */
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; min-height: 48px; padding: 6px 8px; background: var(--palm-up); color: var(--text); font-size: 16px; }
.seg button.on { background: var(--text); color: var(--ink); }
/* A hand with as many fingers as the menu uses. */
.hand { display: inline-flex; align-items: flex-end; gap: 2px; height: 18px; }
.hand i { width: 4px; border-radius: 2px; }
.hand i:nth-child(1) { height: 50%; background: var(--thumb); }
.hand i:nth-child(2) { height: 86%; background: var(--index); }
.hand i:nth-child(3) { height: 100%; background: var(--middle); }
.hand i:nth-child(4) { height: 90%; background: var(--ring); }
.hand i:nth-child(5) { height: 66%; background: var(--little); }
.hands { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hands button { display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 0; padding: 8px 0 4px; background: transparent; color: var(--soft); border-radius: 24px; }
.hands .hand { height: 52px; gap: 4px; }
.hands .hand i { width: 10px; border-radius: 5px; }
.hands button:not(.on) .hand i { background: var(--palm-up); }
.hands b { min-width: 56px; padding: 3px 0; border-radius: 999px; font-size: 18px; font-weight: 800; }
.hands button.on b { background: var(--text); color: var(--ink); }

/* Volume: ten steps that grow, coloured two by two in finger order as far as it is turned up. */
.meter-row { display: flex; align-items: center; gap: 12px; }
.meter-row strong { min-width: 3em; text-align: right; font-weight: 800; }
.level { flex: 1; display: flex; align-items: flex-end; gap: 4px; height: 56px; padding: 6px 0; touch-action: none; cursor: pointer; border-radius: 8px; }
.level:focus-visible { outline: 3px solid var(--index); outline-offset: 4px; }
.level i { flex: 1; height: calc(28% + var(--n) * 8%); border-radius: 4px; background: var(--palm-up); }
.level i.on:nth-child(-n+10) { background: var(--little); }
.level i.on:nth-child(-n+8) { background: var(--ring); }
.level i.on:nth-child(-n+6) { background: var(--middle); }
.level i.on:nth-child(-n+4) { background: var(--index); }
.level i.on:nth-child(-n+2) { background: var(--thumb); }

.people { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.page > *, .stack > * { min-width: 0; }
.person { display: flex; align-items: center; gap: 14px; padding: 8px 0; text-align: left; min-height: 60px; }
.face { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--c, var(--thumb)); color: var(--ink); font-style: normal; font-weight: 800; font-size: 20px; }
.person:nth-child(5n+2) { --c: var(--index); }
.person:nth-child(5n+3) { --c: var(--middle); }
.person:nth-child(5n+4) { --c: var(--ring); }
.person:nth-child(5n+5) { --c: var(--little); }
.person div { flex: 1; min-width: 0; }
.person strong { display: block; font-size: 18px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person small { display: block; color: var(--soft); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person button { flex: none; min-height: 44px; padding: 8px 18px; font-size: 15px; }

/* The conversation. */
#log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
#log .empty { margin: auto; text-align: center; }
.msg { max-width: 82%; padding: 11px 16px; border-radius: 24px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg time { display: block; font-size: 12px; opacity: .65; margin-top: 2px; }
.msg.them { align-self: flex-start; background: var(--palm); border-bottom-left-radius: 8px; font-size: 20px; }
.msg.me { align-self: flex-end; background: var(--text); color: var(--ink); border-bottom-right-radius: 8px; }
.msg.failed { outline: 2px solid var(--red); }
.msg.sending { opacity: .6; }
.msg img { display: block; max-width: 100%; max-height: 50vh; border-radius: 14px; margin: -2px -6px 6px; max-width: calc(100% + 12px); }
.msg.emoji { font-size: 56px; line-height: 1.15; background: transparent; padding: 0 4px; }
/* "Is typing": five fingers lifting one after the other. */
.typing-row { align-self: flex-start; display: flex; flex-direction: column; gap: 4px; }
.typing-row small { color: var(--soft); font-size: 13px; padding-left: 8px; }
.msg.typing { display: flex; align-items: flex-end; gap: 6px; padding: 22px 20px 14px; }
.msg.typing i { width: 9px; border-radius: 5px; animation: typing 1.75s infinite ease-in-out; }
.msg.typing i:nth-child(1) { height: 12px; background: var(--thumb); }
.msg.typing i:nth-child(2) { height: 20px; background: var(--index); animation-delay: .25s; }
.msg.typing i:nth-child(3) { height: 24px; background: var(--middle); animation-delay: .5s; }
.msg.typing i:nth-child(4) { height: 21px; background: var(--ring); animation-delay: .75s; }
.msg.typing i:nth-child(5) { height: 15px; background: var(--little); animation-delay: 1s; }
@keyframes typing { 0%, 40%, 100% { opacity: .6; transform: translateY(0); } 20% { opacity: 1; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) {
  .msg.typing i, .working.on .hand i { animation: none; opacity: 1; }
  .menu-shade, .menu-sheet, .menu-way { animation: none; }
  .menu-button .hand i, .menu-way .finger-mark { transition: none; }
  button { transition: none; }
  button:active { transform: none; }
}

form.send { display: flex; gap: 8px; padding: 10px 12px 12px; align-items: flex-end; }
form.send textarea { flex: 1; min-width: 0; resize: none; max-height: 140px; padding: 10px 18px; min-height: 48px; }

/* Scrolling: a thin bar in the colour of the palm instead of the browser's own grey one. */
* { scrollbar-width: thin; scrollbar-color: var(--palm-up) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--palm-up); border-radius: 5px; border: 2px solid var(--ground); }
::-webkit-scrollbar-thumb:hover { background: var(--soft); }

/* The status page of the server is read at a desk as often as on a phone: it uses the width
   there is, with the tablets side by side, and scrolls at the edge of the window. */
body.admin { --side: max(20px, calc((100% - 1760px) / 2)); }
body.admin #app { max-width: none; }
body.admin header.bar { padding-left: calc(var(--side) - 8px); padding-right: calc(var(--side) - 8px); }
body.admin header > .fingers-line { left: var(--side); right: var(--side); }
body.admin .center { width: min(100%, 460px); margin: 0 auto; }
body.admin .page { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; align-items: start; gap: 36px 80px; padding: 30px var(--side) 64px; }
@media (min-width: 1100px) {
  body.admin .page { grid-template-columns: minmax(0, 1fr) 380px; }
  body.admin .status { grid-column: 1 / -1; }
  body.admin .side { position: sticky; top: 0; }
}
/* How things stand, said once and on the left where reading starts. */
body.admin .status { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; }
body.admin .verdict { text-align: left; margin: 0; font-size: 32px; letter-spacing: -0.02em; }
body.admin .status .busy { margin-top: 6px; }
body.admin .main, body.admin .side { display: grid; gap: 28px; align-content: start; min-width: 0; }
body.admin .side { gap: 44px; }
body.admin h2.section, body.admin .side .part h2, body.admin h4 { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft); }
/* One tablet: who it is and whether it is there, what is known about it, who is linked, and
   at the foot what is rarely needed. */
.tablet { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding-top: 28px; border-top: 1px solid var(--line); }
.tablet > *, .tablet-body > *, .tablet-foot > * { min-width: 0; }
@media (max-width: 560px) { .pill { margin-left: 0; white-space: normal; } .removal { justify-items: start; text-align: left; } }
.tablet-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.tablet-head h3 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.tablet-head code { font: 600 13px ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--soft); padding: 4px 10px; border-radius: 999px; background: var(--palm); }
.pill { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 999px; background: var(--palm); font-size: 14px; font-weight: 800; white-space: nowrap; }
.pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--middle); }
.pill.bad { color: var(--thumb); }
.pill.bad::before { background: transparent; box-shadow: inset 0 0 0 2px var(--thumb); }
.tablet-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 30px 56px; align-items: start; }
/* One subject inside a tablet: a small heading and what belongs under it. */
.block { display: grid; gap: 12px; align-content: start; }
.version { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.version strong { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.tag { padding: 4px 12px; border-radius: 999px; background: var(--palm); color: var(--middle); font-size: 13px; font-weight: 800; white-space: nowrap; }
.tag.bad { color: var(--thumb); }
/* In a tablet the label and what it says sit close together, read from the left. */
.tablet .fact { align-items: baseline; padding: 6px 0; }
.tablet .fact i { align-self: center; }
.tablet .fact span { flex: 0 0 96px; }
.tablet .fact strong { text-align: left; }
.tablet .people { gap: 0; }
.tablet .person { min-height: 0; padding: 6px 0; }
.tablet .face { width: 38px; height: 38px; font-size: 16px; }
.tablet .person strong { font-size: 16px; }
body.admin .facts { margin-top: 0; }
body.admin .fact span { flex: none; white-space: nowrap; }
body.admin .fact strong { flex: 1; min-width: 0; overflow-wrap: anywhere; }
body.admin .page button { width: auto; min-height: 42px; padding: 9px 20px; font-size: 15px; }
body.admin .choices button { flex: none; }
body.admin .page input[type=text] { min-height: 42px; padding: 9px 16px; font-size: 15px; }
.tablet-foot { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; }
.rename { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rename input[type=text] { width: 280px; max-width: 100%; }
.rename p { flex-basis: 100%; }
.removal { display: grid; justify-items: end; gap: 8px; max-width: 440px; text-align: right; }
body.admin .side form button { width: 100%; min-height: 48px; }
body.admin .side form input[type=text] { min-height: 48px; }

/* The tablet's page for an administrator, at a desk: the parts side by side instead of one
   long column. How the tablet is doing stays in the middle, above them. */
@media (min-width: 1000px) {
  #app:has(.hand-state) { max-width: 1240px; }
  .stack:has(> .hand-state) { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); align-items: start; gap: 36px 56px; }
  .stack:has(> .hand-state) > :not(.part) { grid-column: 1 / -1; }
  .stack:has(> .hand-state) > .facts, .stack:has(> .hand-state) > .hand-state { width: min(100%, 680px); justify-self: center; }
}

/* Inside a block the state sits under the heading, not pushed to the far side. */
.block .pill { margin-left: 0; justify-self: start; }
body.admin select { min-height: 48px; padding: 9px 16px; border-radius: 999px; border: 2px solid transparent; background: var(--palm); color: var(--text); font: inherit; font-size: 15px; }
body.admin select:focus { outline: none; border-color: var(--index); }

/* What went wrong on the devices: one line each, the whole of it under the line when opened. */
.block.wide { grid-column: 1 / -1; }
.diags { display: grid; }
.diag { display: grid; gap: 10px; padding: 10px 0; border-top: 1px solid var(--palm); min-width: 0; }
.diag:first-child { border-top: 0; padding-top: 0; }
body.admin .diag-line { display: grid; gap: 2px; justify-items: start; text-align: left; width: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; color: var(--text); font: inherit; cursor: pointer; }
.diag-line span { font-size: 13px; opacity: .7; }
.diag-line strong { font-weight: 600; overflow-wrap: anywhere; }
.diag-line.bad strong { color: var(--thumb); }
.diag-line:focus-visible { outline: 2px solid var(--index); outline-offset: 4px; }
.trace { margin: 0; max-height: 460px; overflow: auto; padding: 14px 16px; border-radius: 12px; background: var(--palm); font: 12.5px/1.55 ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: pre; user-select: text; }

/* How the hand device is operated: a few choices under its version, each a row of options. */
.operation { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--palm); }
.operation h5 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.operation p { margin: 6px 0 0; }
body.admin .operation .seg button { min-height: 42px; padding: 6px 10px; border-radius: 999px; font-size: 14px; }

/* The tablet's screen, rebuilt for changing and trying out (sim.js). Sizes inside the screen
   follow its own width, so it reads the same on a phone and at a desk. */
.sim-box { container-type: inline-size; min-width: 0; }
.sim { display: grid; gap: 14px; min-width: 0; grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "frame" "under" "save"; }
.sim-top { grid-area: top; }
.sim-main { grid-area: frame; min-width: 0; display: grid; }
.sim-under { grid-area: under; }
.sim-save { grid-area: save; }
/* With room for it, the screen stands large on the left and everything that changes it beside
   it, so nothing has to be scrolled to while looking at the screen. */
@container (min-width: 820px) {
  .sim { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); grid-template-rows: auto auto 1fr; grid-template-areas: "frame top" "frame under" "frame save"; gap: 18px 36px; align-items: start; }
  /* Laying out: the screens on the left, all the tiles to choose from beside them, in a wider column. */
  .sim.laying { grid-template-columns: minmax(0, 1fr) minmax(340px, 46%); }
}
.sim-top { display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: space-between; }
.sim-top .seg { flex: 1 1 200px; }
.sim-for { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; }
.sim-for span { color: var(--soft); font-size: 14px; white-space: nowrap; }
.sim-for .seg { flex: 1; }
.sim-top .seg button { white-space: nowrap; }
/* The frame is what the sizes inside are measured against; a measure of the frame cannot be used on the frame itself. */
.sim-frame { width: 100%; max-width: max(300px, calc((100dvh - 190px) * 1.5)); justify-self: center; container-type: inline-size; border-radius: 22px; background: #06080b; border: 2px solid var(--line); overflow: hidden; }
.sim-screen { position: relative; display: grid; grid-template-rows: auto; align-content: start; gap: 1.6cqw; padding: 2.4cqw 2.4cqw 3cqw; }
.sim-text { min-height: 9cqw; display: flex; align-items: center; padding: 0 3cqw; border-radius: 3cqw; background: var(--text); color: var(--ink); font-size: 5cqw; font-weight: 800; white-space: pre-wrap; overflow: hidden; }
.sim-text.none { background: var(--palm); color: var(--soft); font-weight: 400; font-size: 3.2cqw; }
.sim-crumb { color: var(--soft); font-size: 3cqw; padding-left: 1cqw; min-height: 3.4cqw; }
.sim-tiles { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 1.6cqw; }
/* Heights are given outright, in the screen's own measure: no browser has to work them out from what is left over. */
.sim-col { display: grid; grid-template-rows: 27cqw 5.6cqw; gap: 1cqw; min-width: 0; }
.sim .sim-tile { --c: var(--thumb); position: relative; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; align-items: center; gap: .6cqw; min-height: 0; height: 27cqw; width: 100%; padding: 1.4cqw 1cqw 1.6cqw; border: .7cqw solid var(--c); border-radius: 3.6cqw; background: var(--palm); color: var(--text); overflow: hidden; }
.sim .index { --c: var(--index); }
.sim .middle { --c: var(--middle); }
.sim .ring { --c: var(--ring); }
.sim .little { --c: var(--little); }
.sim .sim-tile.off { opacity: .3; }
.sim .sim-tile:active { transform: none; background: var(--c); color: var(--ink); }
.sim .sim-tile.chosen { background: var(--palm-up); box-shadow: 0 0 0 .6cqw var(--text); }
.sim .sim-tile.editable::after { content: "\270E"; position: absolute; top: 1cqw; right: 1.6cqw; font-size: 3cqw; color: var(--soft); }
.sim-who { justify-self: start; display: flex; align-items: center; gap: 1cqw; }
.sim-who b { display: grid; place-items: center; width: 4.6cqw; height: 4.6cqw; border-radius: 50%; background: var(--c); color: var(--ink); font-size: 2.8cqw; }
.sim-glyph { display: block; width: 6.4cqw; }
.sim-glyph svg { display: block; width: 100%; height: auto; }
.sim-glyph .rest { fill: #4a5868; }
.sim-glyph .rest.line { fill: none; stroke: #4a5868; }
.sim-glyph .mark { fill: var(--c); }
.sim-glyph .mark.line { fill: none; stroke: var(--c); }
.sim-tile strong { font-size: 4.6cqw; font-weight: 800; line-height: 1.12; text-align: center; overflow-wrap: anywhere; white-space: pre-line; }
.sim-tile strong.rows { font-size: 3.9cqw; letter-spacing: .04em; }
.sim-tile small { font-size: 2.7cqw; color: var(--soft); text-align: center; line-height: 1.2; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.sim .sim-band { min-height: 0; height: 5.6cqw; padding: .4cqw 1cqw; border-radius: 2.8cqw; border: 0; background: var(--c, var(--thumb)); color: var(--ink); font-size: 2.6cqw; font-weight: 700; line-height: 1.15; }
.sim .sim-band.none { background: none; }
.sim-hints { display: flex; gap: 1.6cqw; }
.sim .sim-hint { flex: 1; min-height: 6cqw; padding: .6cqw 1cqw; border-radius: 2.4cqw; border: .4cqw solid var(--line); background: none; color: var(--soft); font-size: 2.4cqw; font-weight: 700; }
.sim-spoken { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 2cqw; padding: 6cqw; background: var(--text); color: var(--ink); text-align: center; cursor: pointer; }
.sim-spoken small { font-size: 3cqw; opacity: .6; }
.sim-spoken strong { font-size: 7cqw; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.sim-under { display: grid; gap: 12px; }
.sim-sheet { display: grid; gap: 12px; padding: 16px; border-radius: 22px; background: var(--palm); }
.sim-sheet label { margin: 0; display: grid; gap: 6px; }
.sim-sheet label span { margin-left: 18px; }
.sim-sheet input[type=text] { background: var(--ground); }
.sim-save { display: grid; gap: 8px; }
.sim .choices { display: flex; flex-wrap: wrap; gap: 8px; }
.sim .choices button { flex: 1 1 auto; }
body.admin a.go { justify-self: start; color: var(--index); font-weight: 700; text-decoration: none; }
body.admin a.go:hover, body.admin a.go:focus-visible { text-decoration: underline; }
/* At a desk the try-out may be as large as a tablet held in the hand. */
body.demo #app { max-width: 1500px; }
/* In the administrator's tablet page the screen takes the full width, above the other parts. */
@media (min-width: 1000px) { .stack:has(> .hand-state) > .part:has(.sim-box) { grid-column: 1 / -1; } }

/* Laying out a screen: its tiles in the order the user gets them, and every tile there is to
   choose from. Sized in ordinary measures; the rows follow the number of fingers. */
.tb-board { container: board / inline-size; display: grid; gap: 18px; align-content: start; min-width: 0; }
.tb-page { display: grid; gap: 8px; min-width: 0; }
.tb-page h5, .tb-palette h5 { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.tb-row { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 10px; }
.tb-tile { --c: var(--line); position: relative; display: grid; align-content: center; justify-items: center; gap: 4px; grid-template-columns: minmax(0, 1fr); min-height: 104px; min-width: 0; padding: 12px 8px; border: 3px solid var(--c); border-radius: 22px; background: var(--palm); color: var(--text); text-align: center; cursor: pointer; user-select: none; -webkit-user-select: none; }
.tb-tile.thumb { --c: var(--thumb); }
.tb-tile.index { --c: var(--index); }
.tb-tile.middle { --c: var(--middle); }
.tb-tile.ring { --c: var(--ring); }
.tb-tile.little { --c: var(--little); }
.tb-tile strong { font-size: clamp(13px, 4.2cqw, 17px); font-weight: 800; line-height: 1.15; overflow-wrap: break-word; hyphens: auto; max-width: 100%; }
.sim-main { align-content: start; gap: 14px; }
.tb-holding { scroll-margin-top: 12px; }
.tb-tile small { font-size: 12.5px; line-height: 1.25; color: var(--soft); overflow-wrap: anywhere; }
.tb-tile small:empty { display: none; }
.tb-tile em { font-style: normal; font-size: 11px; color: var(--soft); }
.tb-tile.does { background: var(--palm-up); }
.tb-who { position: absolute; top: 6px; left: 8px; }
.tb-who .sim-glyph { width: 26px; }
.tb-row .tb-tile { padding-top: 34px; }
.tb-tile.chosen { box-shadow: 0 0 0 3px var(--text); }
.tb-tile.on { border-style: dashed; opacity: .6; cursor: default; }
.tb-tile.over, .tb-tile.tb-over { box-shadow: 0 0 0 3px var(--index); }
.tb-tile.lifted { opacity: .35; }
body .tb-tile.end { border: 3px dashed var(--line); background: none; color: var(--soft); font-size: 22px; font-weight: 700; min-height: 104px; border-radius: 22px; padding: 12px 8px; }
/* Where a screen's tiles side by side would be too narrow for their words (a phone), each
   finger is a row, top to bottom in the order of the fingers: the hand on the left, the cross
   on the right, the words between them at full size. */
@container board (max-width: 619px) {
  .tb-row.screen { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .tb-row.screen .tb-tile { min-height: 66px; padding: 10px 52px 10px 54px; justify-items: start; text-align: left; border-radius: 18px; }
  .tb-row.screen .tb-tile strong { font-size: 17px; }
  .tb-row.screen .tb-who { top: 50%; left: 14px; transform: translateY(-50%); }
  .tb-row.screen .tb-off { top: 50%; right: 10px; transform: translateY(-50%); }
  body .tb-row.screen .tb-tile.end { min-height: 56px; justify-items: center; padding: 8px; border-radius: 18px; }
}
/* The bands under the letters: each letter tile as he sees it, and under it, in the same colour,
   the band to choose what that finger's long choice does. On a narrow page each finger is a row. */
.tb-col { display: grid; gap: 6px; align-content: start; min-width: 0; }
.tb-tile.letters { cursor: default; min-height: 120px; background: var(--palm); }
.tb-tile.letters strong { white-space: pre-line; letter-spacing: .05em; }
.tb-band-wrap { position: relative; display: block; min-width: 0; }
.tb-band-wrap::after { content: "\25BE"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink); font-size: 16px; pointer-events: none; }
.tb-band-wrap:has(.none)::after { color: var(--soft); }
.tb-band { --c: var(--thumb); width: 100%; min-height: 48px; padding: 8px 30px 8px 12px; border: 0; border-radius: 14px; background: var(--c); color: var(--ink); font: inherit; font-size: 16px; font-weight: 800; text-align: center; text-overflow: ellipsis; appearance: none; -webkit-appearance: none; cursor: pointer; }
.tb-band.index { --c: var(--index); }
.tb-band.middle { --c: var(--middle); }
.tb-band.ring { --c: var(--ring); }
.tb-band.little { --c: var(--little); }
.tb-band.none { background: none; color: var(--soft); box-shadow: inset 0 0 0 2px var(--line); }
.tb-band:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.tb-band option { background: var(--palm); color: var(--text); }
.tb-band-says { font-size: 12.5px; line-height: 1.25; color: var(--soft); text-align: center; }
/* Side by side only while every band has room for its longest name; otherwise one row per finger. */
.bands-page { container: bands / inline-size; }
@container bands (max-width: 459px) {
  .tb-row.bands { grid-template-columns: 1fr; }
  .tb-row.bands .tb-col { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); grid-template-areas: "tile band" "tile says"; align-items: center; column-gap: 12px; }
  .tb-row.bands .tb-tile { grid-area: tile; min-height: 96px; }
  .tb-row.bands .tb-band-wrap { grid-area: band; align-self: end; }
  .tb-row.bands .tb-band-says { grid-area: says; align-self: start; text-align: left; }
}
@container bands (max-width: 619px) {
  .tb-row.bands:is([data-n="4"], [data-n="5"]) { grid-template-columns: 1fr; }
  .tb-row.bands:is([data-n="4"], [data-n="5"]) .tb-col { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); grid-template-areas: "tile band" "tile says"; align-items: center; column-gap: 12px; }
  .tb-row.bands:is([data-n="4"], [data-n="5"]) .tb-tile { grid-area: tile; min-height: 96px; }
  .tb-row.bands:is([data-n="4"], [data-n="5"]) .tb-band-wrap { grid-area: band; align-self: end; }
  .tb-row.bands:is([data-n="4"], [data-n="5"]) .tb-band-says { grid-area: says; align-self: start; text-align: left; }
}
@container bands (max-width: 779px) {
  .tb-row.bands[data-n="5"] { grid-template-columns: 1fr; }
  .tb-row.bands[data-n="5"] .tb-col { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); grid-template-areas: "tile band" "tile says"; align-items: center; column-gap: 12px; }
  .tb-row.bands[data-n="5"] .tb-tile { grid-area: tile; min-height: 96px; }
  .tb-row.bands[data-n="5"] .tb-band-wrap { grid-area: band; align-self: end; }
  .tb-row.bands[data-n="5"] .tb-band-says { grid-area: says; align-self: start; text-align: left; }
}
body .tb-tile.end.ready { border-color: var(--index); color: var(--index); font-size: 15px; }
.tb-ghost { position: fixed; z-index: 50; margin: 0; pointer-events: none; transform: translate(-50%, -50%) rotate(-2deg); box-shadow: 0 18px 40px rgba(0, 0, 0, .6); opacity: .95; }
.tb-palette { display: grid; gap: 10px; padding: 16px; border-radius: 22px; background: #06080b; border: 2px solid var(--line); min-width: 0; }
.tb-palette.tb-over { border-color: var(--red); }
.tb-palette h4 { margin: 0; font-size: 18px; font-weight: 800; }
.tb-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
.tb-pick .tb-tile { min-height: 76px; border-width: 2px; border-radius: 18px; }
.tb-pick .tb-tile.there { opacity: .45; }
body .tb-tile.own { border: 2px dashed var(--index); background: none; color: var(--index); min-height: 76px; border-radius: 18px; padding: 12px 8px; }
body .tb-tile.own small { color: var(--soft); }
.tb-holding { display: grid; gap: 10px; padding: 14px 16px; border-radius: 22px; background: var(--index); }
.tb-holding p { color: var(--ink); font-weight: 700; }
.tb-holding button.quiet { background: rgba(11, 15, 20, .25); color: var(--ink); }
.sim-sheet strong { font-size: 18px; }

/* Inside the chat. On a phone the ways out stay behind the hand button and the screen is all
   there is. At a desk they stand beside it, and what is on the screen gets the room it can use:
   a conversation stays a readable column, a form stays a form, the tablet's page spreads out. */
#side { display: none; }
#content { display: contents; }
@media (min-width: 1000px) {
  #app.shell { max-width: 1640px; display: grid; grid-template-columns: 330px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); column-gap: 8px; }
  #app.shell #side { display: flex; flex-direction: column; gap: 2px; padding: 14px 12px 20px 16px; overflow-y: auto; border-right: 1px solid var(--line); }
  #app.shell #content { display: flex; flex-direction: column; position: relative; min-width: 0; min-height: 0; }
  #app.shell .menu-button { display: none; }
  .side-who { display: flex; align-items: center; gap: 12px; padding: 6px 8px 18px; }
  .side-who img { width: 44px; height: 44px; }
  .side-who strong { display: block; font-size: 20px; font-weight: 800; }
  .side-who small { display: block; color: var(--soft); font-size: 13px; }
  #side .menu-way { animation: none; border: 0; border-radius: 22px; width: 100%; min-height: 64px; }
  #side .menu-way.now { background: var(--palm-up); }
  #side .menu-way.now .finger-mark { transform: translateY(-5px); }
  /* The conversation: a column that reads well, in the middle of the room it has. */
  #app.shell #content:has(> #log) > :not(header) { width: min(100%, 900px); margin-left: auto; margin-right: auto; }
  #app.shell #content:has(> #log) > header { display: none; }
  /* A page with a form or a list keeps the width of a form; the tablet's page takes everything. */
  #app.shell .page > :not(:has(.hand-state)):not(:has(.sim-box)):not(.hand-state) { max-width: 780px; }
  #app.shell .page { padding-left: 32px; padding-right: 32px; }
}
/* The way to take a tile off the screen: a cross on the tile, large enough for a finger. */
body .tb-off { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; min-height: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; background: var(--palm-up); color: var(--text); font-size: 20px; line-height: 1; font-weight: 700; }
body .tb-off:hover, body .tb-off:focus-visible { background: var(--red); color: var(--ink); }
.tb-ghost .tb-off { display: none; }
/* The bin under the screen being laid out. Quiet until a tile is in the air or one is chosen. */
body .tb-bin { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 64px; padding: 10px 16px; border: 2px dashed color-mix(in srgb, var(--red) 60%, transparent); border-radius: 22px; background: none; color: color-mix(in srgb, var(--red) 85%, var(--soft)); font-size: 15px; font-weight: 700; cursor: default; }
.tb-bin svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body .tb-bin.ready { border-color: var(--red); color: var(--red); cursor: pointer; }
.sim.carrying .tb-bin { border-color: var(--red); color: var(--red); min-height: 96px; }
body .tb-bin.tb-over { background: var(--red); border-color: var(--red); color: var(--ink); border-style: solid; }
/* Without a mouse nothing is dragged: the bin then only shows for a tile that was tapped. */
@media (hover: none) {
  body .tb-bin:not(.ready) { display: none; }
  /* A tile carried by a finger: the bin waits at the foot of the window, always in reach. */
  body .sim.carrying .tb-bin { display: flex; position: fixed; z-index: 40; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); width: auto; min-height: 72px; background: var(--ground); box-shadow: 0 10px 30px rgba(0, 0, 0, .6); }
}

/* Red is for taking away, here as everywhere: the cross, the bin, the button that removes. */
button.quiet.warn { color: var(--red); }
.tb-undo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 10px 10px 10px 18px; border-radius: 22px; background: var(--palm); }
.tb-undo p { color: var(--text); font-size: 15px; }
.tb-undo button { min-height: 40px; padding: 8px 18px; }

/* The status page, person by person: the people on the left, the one that is open on the right.
   On a phone it is one of the two, with a way back to the list. */
body.admin .page.people { grid-template-columns: minmax(0, 1fr); gap: 28px 72px; }
.who-list, .detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; align-content: start; min-width: 0; }
.who-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
body.admin .who-list .verdict { font-size: 24px; line-height: 1.2; }
.who-rows h2.section { margin-bottom: 8px; }
body.admin .page .who-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 8px 14px 8px 10px; border-radius: 22px; background: none; color: var(--text); text-align: left; text-decoration: none; font-weight: 400; }
body.admin .page .who-row:hover, body.admin .page .who-row:focus-visible { background: var(--palm); }
body.admin .page .who-row.now { background: var(--palm-up); }
body.admin .page .who-row.plain { padding-left: 18px; min-height: 56px; }
.who-row > span { min-width: 0; flex: 1; }
.who-row strong { display: block; font-size: 17px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-row small { display: block; color: var(--soft); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-row.bad small { color: var(--thumb); }
.who-row .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--middle); }
.who-row.bad .dot { background: transparent; box-shadow: inset 0 0 0 2px var(--thumb); }
body.admin .who-rows > button:not(.who-row) { width: 100%; min-height: 48px; margin-top: 10px; }
.face.thumb { background: var(--thumb); color: var(--ink); }
.face.index { background: var(--index); color: var(--ink); }
.face.middle { background: var(--middle); color: var(--ink); }
.face.ring { background: var(--ring); color: var(--ink); }
.face.little { background: var(--little); color: var(--ink); }
.who-row .face { flex: none; width: 42px; height: 42px; font-size: 18px; }
.detail.tablet { border-top: 0; padding-top: 0; }
.detail-head { display: flex; align-items: center; gap: 18px; }
.detail-head .face.big { flex: none; width: 64px; height: 64px; font-size: 28px; }
.detail h2 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; text-align: left; }
.detail-head p { margin-top: 4px; }
.detail.narrow { max-width: 620px; }
.detail.narrow form.pair button[type=submit] { flex: 1; }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; color: var(--soft); line-height: 1.45; }
body.admin .page .back-to-list { justify-self: start; }
@media (min-width: 1000px) {
  body.admin .page.people { grid-template-columns: 340px minmax(0, 1fr); }
  .who-list { position: sticky; top: 0; }
  body.admin .page .back-to-list { display: none; }
}
@media (max-width: 999px) {
  .page.at-list > .detail { display: none; }
  .page.at-detail > .who-list { display: none; }
}
.manage { padding-top: 22px; border-top: 1px solid var(--line); }
.manage .tablet-foot > .block { max-width: 520px; }

/* Holding a tile lifts it: the phone's own menu and text selection stay out of the way, and
   where the tile will land is shown by a bar in front of that place. */
.tb-tile { -webkit-touch-callout: none; touch-action: manipulation; }
.sim.dragging { user-select: none; -webkit-user-select: none; }
.tb-row .tb-tile.tb-over::before { content: ""; position: absolute; left: -8px; top: 6px; bottom: 6px; width: 5px; border-radius: 3px; background: var(--text); }
.tb-row .tb-tile.tb-over { box-shadow: none; }
.tb-ghost { transition: none; }

/* Setting a tablet up from the status page. */
.volume { display: flex; align-items: center; gap: 14px; }
.volume strong { min-width: 64px; text-align: center; font-size: 24px; font-weight: 800; }
body.admin .page button.round { width: 48px; min-height: 48px; padding: 0; font-size: 24px; line-height: 1; }
body.admin .page textarea { width: 100%; min-height: 120px; padding: 12px 16px; border-radius: 22px; border: 2px solid transparent; background: var(--palm); color: var(--text); font: inherit; font-size: 15px; resize: vertical; }
body.admin .page textarea:focus { outline: none; border-color: var(--index); }
body.admin .block .seg button { min-height: 42px; padding: 6px 10px; }
body.admin .sim .choices button { flex: 1 1 auto; }
p.block.wide { margin: 0; }

/* The times of the hand device: a small table per finger, and a few fields for all fingers. */
.timing { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--palm); min-width: 0; }
.timing h5 { margin: 6px 0 0; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.times { display: grid; grid-template-columns: minmax(84px, auto) repeat(3, minmax(0, 1fr)); gap: 6px 8px; align-items: center; }
.times b { font-size: 12px; font-weight: 700; color: var(--soft); line-height: 1.2; }
.finger-name { font-weight: 800; font-size: 14px; white-space: nowrap; }
.finger-name::before { content: ""; display: inline-block; width: 8px; height: 18px; margin-right: 8px; border-radius: 4px; vertical-align: -3px; background: var(--c, var(--thumb)); }
.finger-name.thumb { --c: var(--thumb); }
.finger-name.index { --c: var(--index); }
.finger-name.middle { --c: var(--middle); }
.finger-name.ring { --c: var(--ring); }
.finger-name.little { --c: var(--little); }
body.admin .page .timing input[type=text] { min-height: 40px; padding: 6px 12px; text-align: right; font-variant-numeric: tabular-nums; }
.time-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 12px; }
.time-field { margin: 0; display: grid; gap: 4px; }
.time-field span { margin: 0 0 0 4px; font-size: 13px; color: var(--soft); line-height: 1.25; }
.timing .choices button { flex: 1 1 auto; }

/* Which fingers take part: five buttons in the colours of the fingers, each on or off. */
.finger-pick-box { display: grid; gap: 8px; }
.finger-pick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
body .finger-pick button { --c: var(--thumb); display: grid; justify-items: center; gap: 4px; width: 100%; min-height: 0; padding: 8px 0; border-radius: 18px; border: 2px solid transparent; background: var(--palm); color: var(--soft); font-size: 12px; font-weight: 700; letter-spacing: -0.01em; overflow: hidden; }
body.admin .page .finger-pick button { width: 100%; min-height: 0; padding: 8px 0; font-size: 12px; }
body .finger-pick button.index { --c: var(--index); }
body .finger-pick button.middle { --c: var(--middle); }
body .finger-pick button.ring { --c: var(--ring); }
body .finger-pick button.little { --c: var(--little); }
body .finger-pick button.on { border-color: var(--c); background: var(--palm-up); color: var(--text); }
.finger-pick .sim-glyph { width: 34px; }
.finger-pick button:not(.on) .sim-glyph .mark { fill: #4a5868; }
.finger-pick button:not(.on) .sim-glyph .mark.line { fill: none; stroke: #4a5868; }

/* One person in tabs. Each tab is a screen of its own, so nothing has to be scrolled past to
   get somewhere, and what stands side by side is about the same height. */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
body.admin .page .tabs button { min-height: 44px; padding: 8px 20px; border-radius: 999px; background: none; color: var(--soft); font-size: 16px; font-weight: 700; }
body.admin .page .tabs button:hover, body.admin .page .tabs button:focus-visible { background: var(--palm); color: var(--text); }
body.admin .page .tabs button.now { background: var(--text); color: var(--ink); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 264px), 1fr)); gap: 36px 52px; align-items: start; }
.cards .removal { justify-items: start; text-align: left; max-width: none; }
.choices.foot { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--palm); }
.detail > .block.wide { margin-top: 6px; }
.cards > * { min-width: 0; }
.cards.pair { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); max-width: 1180px; }
.detail .lone { max-width: 620px; }
.detail .sim-box { margin-top: 2px; }
.detail .operation { border-top: 0; padding-top: 6px; }
.detail .timing { border-top: 0; padding-top: 0; }
.detail .timing h5:first-child { margin-top: 0; }
@media (max-width: 700px) { .tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px; padding: 0 20px 14px; scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; } body.admin .page .tabs button { flex: none; } }

/* Every device there is, as a table that reads across: who, which device, what it runs. On a
   phone it scrolls sideways rather than squeeze its columns. */
.devices { display: grid; grid-template-columns: repeat(6, max-content); gap: 0; overflow-x: auto; max-width: 100%; font-size: 15px; }
.devices > * { padding: 9px 22px 9px 0; white-space: nowrap; border-top: 1px solid var(--palm); }
.devices > b { border-top: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.devices .who { font-weight: 800; }
.devices .busy { color: var(--thumb); font-weight: 800; }
p.device { margin: 0; }

/* The help. A "?" stands beside the heading of a part and opens the bit of the help that is
   about it, over the page; the help pages hold all of it, grouped by what someone wants to do. */
/* The "?" follows the last word of the heading, also when the heading runs over two lines. */
.help-tail { white-space: nowrap; }
.with-help button.help-q { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; margin: -4px 0 0 10px; }
button.help-q { flex: none; width: 30px; height: 30px; min-height: 30px; padding: 0; border-radius: 50%; background: var(--palm-up); color: var(--soft); font-size: 16px; font-weight: 800; line-height: 1; letter-spacing: 0; text-transform: none; }
button.help-q:hover, button.help-q:focus-visible { background: var(--text); color: var(--ink); }
/* A finger needs more room than a mouse: the round stays small, the place to tap does not. */
@media (pointer: coarse) { button.help-q { position: relative; } button.help-q::after { content: ""; position: absolute; inset: -8px; } }
body.admin .page button.help-q { width: 26px; height: 26px; min-height: 26px; padding: 0; font-size: 14px; }

dialog.help-sheet { width: min(600px, calc(100% - 40px)); max-width: none; max-height: min(82dvh, 760px); padding: 0; border: 0; border-radius: 28px; background: var(--palm); color: var(--text); box-shadow: 0 24px 70px rgba(0, 0, 0, .55); }
dialog.help-sheet::backdrop { background: rgba(4, 7, 10, .72); }
.help-sheet-in { display: flex; flex-direction: column; max-height: min(82dvh, 760px); }
.help-sheet-head { display: flex; align-items: center; gap: 12px; padding: 16px 14px 10px 24px; }
.help-sheet-head strong { flex: 1; font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
.help-sheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 24px 12px; }
.help-sheet-more { display: block; padding: 14px 24px 20px; border-top: 1px solid var(--line); color: var(--index); font-weight: 700; text-decoration: none; }
.help-sheet-more:hover, .help-sheet-more:focus-visible { text-decoration: underline; }
@media (max-width: 600px) {
  /* On a phone it comes up from below, as sheets do there, and never hides the way to close. */
  dialog.help-sheet { width: 100%; margin: auto 0 0; border-radius: 28px 28px 0 0; max-height: 88dvh; }
  .help-sheet-in { max-height: 88dvh; padding-bottom: env(safe-area-inset-bottom); }
  dialog.help-sheet[open] { animation: help-up .22s ease-out; }
}
@keyframes help-up { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { dialog.help-sheet[open] { animation: none; } }

/* The text of an article, in the pages and in the sheet alike. Steps are what people follow, so
   they are numbered large and stand out; a button on the screen is shown as the capsule it is. */
.help-text { display: grid; gap: 14px; max-width: 70ch; }
.help-text p { color: var(--text); line-height: 1.55; }
.help-text p.help-lead { color: var(--soft); font-size: 19px; line-height: 1.45; }
.help-text a { color: var(--index); font-weight: 700; text-decoration: none; }
.help-text a:hover, .help-text a:focus-visible { text-decoration: underline; }
.help-text .ui { display: inline-block; padding: 0 10px; border-radius: 999px; background: var(--palm-up); color: var(--text); font-weight: 700; white-space: nowrap; line-height: 1.6; }
dialog .help-text .ui { background: var(--line); }
.help-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 12px; }
.help-steps li { counter-increment: step; position: relative; padding-left: 46px; min-height: 32px; line-height: 1.55; padding-top: 3px; }
.help-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--text); color: var(--ink); font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.help-points { margin: 0; padding-left: 22px; display: grid; gap: 8px; line-height: 1.55; }
.help-points li::marker { color: var(--soft); }
.help-tip { padding: 14px 18px; border-radius: 20px; background: var(--palm); }
dialog .help-tip { background: var(--palm-up); }
.help-part { display: grid; gap: 12px; margin-top: 14px; scroll-margin-top: 16px; }
/* A screenshot as large as it was taken (they are made at twice the pixels, see
   tools/help_shots.py, and cropped to what matters), never wider than the text, and never so
   tall that the steps around it leave the screen. A tap shows it on its own. */
.help-shot { display: grid; gap: 8px; justify-items: start; margin: 4px 0; }
.help-shot a { display: block; max-width: 100%; cursor: zoom-in; border-radius: 18px; }
.help-shot img { display: block; width: auto; height: auto; max-width: 100%; max-height: min(80vh, 720px); border-radius: 18px; border: 1px solid var(--line); background: var(--ink); }
.help-shot figcaption { color: var(--soft); font-size: 14px; line-height: 1.4; }
.help-part h2, .help-part h3 { font-size: 20px; }
.help-part.help-here h2 { color: var(--thumb); }

/* The help pages: the topics beside the article at a desk, one column on a phone. The page
   itself scrolls, so a phone's bar can fold away while reading. */
body.help #app { height: auto; min-height: 100dvh; max-width: none; }
body.help header.bar { padding-left: max(16px, calc((100% - 1320px) / 2)); padding-right: max(16px, calc((100% - 1320px) / 2)); }
body.help header > .fingers-line { left: max(16px, calc((100% - 1320px) / 2)); right: max(16px, calc((100% - 1320px) / 2)); }
.help-home { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.help-lang { margin-left: auto; gap: 4px; flex: none; }
.help-lang button { flex: none; min-height: 44px; min-width: 52px; padding: 6px 12px; border-radius: 999px; font-size: 15px; font-weight: 800; letter-spacing: .04em; }
.help-page { overflow: visible; width: min(100%, 1320px); margin: 0 auto; padding: 22px 16px 72px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: start; }
.help-nav { display: none; }
.help-main { display: grid; gap: 26px; min-width: 0; }
.help-search input { width: 100%; min-height: 54px; background: var(--palm); color: var(--text); border: 2px solid transparent; border-radius: 999px; padding: 12px 22px; font: inherit; font-size: 18px; -webkit-appearance: none; appearance: none; }
.help-search input:focus { outline: none; border-color: var(--index); }
.help-view { display: grid; gap: 36px; }
.help-hello { display: grid; gap: 8px; }
.help-hello h1 { font-size: 30px; }
/* The groups flow down in columns, like a newspaper: a short group leaves no hole beside a long one. */
.help-groups { columns: 2 380px; column-gap: 56px; }
.help-group { --c: var(--thumb); display: grid; gap: 10px; scroll-margin-top: 16px; break-inside: avoid; margin-bottom: 44px; }
.help-group.index, .help-crumb.index, .help-nav-title.index { --c: var(--index); }
.help-group.middle, .help-crumb.middle, .help-nav-title.middle { --c: var(--middle); }
.help-group.ring, .help-crumb.ring, .help-nav-title.ring { --c: var(--ring); }
.help-group.little, .help-crumb.little, .help-nav-title.little { --c: var(--little); }
.help-group-head { display: flex; gap: 14px; align-items: flex-start; }
.help-group-head .finger-mark, .help-crumb .finger-mark { flex: none; width: 10px; height: 40px; border-radius: 5px; background: var(--c, var(--thumb)); }
.help-group-head h2 { font-size: 22px; }
.help-group-head p { font-size: 15px; margin-top: 4px; }
.help-list { display: grid; gap: 2px; }
.help-row { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 10px 16px; border-radius: 20px; color: var(--text); text-decoration: none; }
.help-row::after { content: "›"; margin-left: auto; color: var(--soft); font-size: 26px; line-height: 1; }
.help-row span { min-width: 0; }
.help-row strong { display: block; font-size: 17px; font-weight: 800; }
.help-row small { display: block; color: var(--soft); font-size: 14px; line-height: 1.35; margin-top: 2px; }
.help-row:hover, .help-row:focus-visible { background: var(--palm); outline: none; }
.help-count { font-size: 15px; }
.help-article { display: grid; gap: 14px; }
.help-back { justify-self: start; color: var(--index); font-weight: 700; text-decoration: none; padding: 6px 0; }
.help-crumb { justify-self: start; display: flex; align-items: center; gap: 10px; color: var(--soft); font-size: 14px; font-weight: 700; text-decoration: none; }
.help-crumb .finger-mark { height: 22px; width: 8px; }
.help-article h1 { font-size: 32px; margin-bottom: 4px; }
.help-next { display: grid; gap: 10px; padding-top: 24px; border-top: 1px solid var(--line); max-width: 70ch; }
.help-next h2 { font-size: 15px; color: var(--soft); letter-spacing: .02em; }
@media (min-width: 980px) {
  .help-page { grid-template-columns: 290px minmax(0, 1fr); gap: 64px; padding-top: 30px; }
  .help-nav { display: grid; gap: 22px; position: sticky; top: 0; max-height: 100dvh; overflow-y: auto; padding: 4px 8px 40px 0; }
  .help-nav-group { display: grid; gap: 1px; }
  .help-nav a { color: var(--soft); text-decoration: none; font-size: 15px; padding: 6px 12px; border-radius: 12px; }
  .help-nav a:hover, .help-nav a:focus-visible { background: var(--palm); color: var(--text); }
  .help-nav a.now { background: var(--palm-up); color: var(--text); font-weight: 700; }
  .help-nav a.help-nav-title { color: var(--text); font-weight: 800; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; border-left: 4px solid var(--c, var(--thumb)); border-radius: 0 12px 12px 0; margin-bottom: 4px; }
  .help-main { gap: 30px; }
}
.sim-mode { flex: 1 1 240px; display: flex; align-items: center; gap: 12px; }
.sim-mode .seg { flex: 1; }
a.help-link { align-self: flex-start; color: var(--index); font-weight: 700; text-decoration: none; padding: 6px 0; }
a.help-link:hover, a.help-link:focus-visible { text-decoration: underline; }
