/* To the Glory of the Lord Jesus Christ, His Church and His Kingdom: */
/* The page's own chrome, over the canvas: the stick, the level's
name, the round's end. Only var() here; the values are in
root.css. Linked, never in the page: the page's policy lets only
the splash's style live there (index.html). */
#s, #g  { display: none !important; }
#s  {
  position: fixed; top: 0; right: 0; left: var(--cell-10); height: var(--cell); padding: 0 var(--half);
  font: var(--text)/var(--cell) var(--mono); text-align: right; white-space: nowrap;
  /* scrolled, never cut (Scott, 2026-10-22: "what the fuck is so
  needing to be hidden?") */
  overflow-x: auto; scrollbar-width: none; color: var(--ink); background: var(--veil);
}
#g  { position: fixed; top: 0; left: 0; display: flex; height: var(--cell); }
#g i  { font-style: normal; background: var(--veil); }
#k, #n  { position: fixed; border-radius: 50%; pointer-events: none; }
#k  {
  width: var(--cell-3); height: var(--cell-3); margin: calc(var(--cell-3) / -2);
  border: var(--line) solid var(--ring);
}
#n  { width: var(--cell); height: var(--cell); margin: calc(var(--cell) / -2); background: var(--ink-soft); }
/* the speedometer, in/s (22-input; Scott, 2026-10-10: "a speedometer
in in/sec"): on the status bar till the speed wheel's key reads it */
#speed  {
  position: fixed; right: var(--cell); bottom: 0; font: var(--bold) var(--text-big)/var(--cell) var(--mono);
  color: var(--ink); text-shadow: var(--halo); pointer-events: none;
}
#cal  {
  position: fixed; left: 50%; top: 30%; transform: translateX(-50%); z-index: 900; margin: 0;
  padding: 16px 24px; background: rgba(5, 6, 12, .88); color: #e8e4d8; font: 16px/1.5 var(--mono);
  border-radius: 8px; pointer-events: none;
}
#ring  { position: fixed; z-index: 800; font-family: var(--mono); pointer-events: none; }
#ring .does  { font-size: 13px; fill: #bbb; }
#ring .does.lit  { font-size: 17px; font-weight: 700; fill: #fff; }
#g b, #g i, #e b  {
  box-sizing: border-box; width: var(--cell-2); height: var(--cell);
  font: var(--bold) var(--text-big)/var(--cell) var(--mono); text-align: center; color: var(--ink);
  border: 0 solid var(--ink);
}
#g b.me  { border-width: var(--edge); line-height: calc(var(--cell) - 2 * var(--edge)); }
#x  {
  position: fixed; left: 0; top: 0; display: flex; height: var(--cell); max-width: 100vw;
  font: var(--text)/var(--cell) var(--mono); color: var(--ink); text-shadow: var(--halo);
}
#x span, #x select  { padding: 0 var(--half); white-space: nowrap; }
#x select  {
  appearance: none; height: var(--cell); border: 0; background: transparent; font: inherit; color: inherit;
  text-shadow: inherit; cursor: pointer;
}
#x option  { background: var(--pick-bg); color: var(--ink); text-shadow: none; }
/* h, the switchboard: a column of emos at the foot of the thumb's
side, each key 36 points, in at first; a drag out puts it away
past the edge, a drag in brings it back (frame/26-board.mjs).
Lit: switched on. No background: the icons alone (Scott,
2026-10-07: backgrounds are to show status and activity). The
10C key, the rose, is the one always seen: the keys above it show
only while it is pressed (26-board). */
.h  {
  position: fixed; display: flex; flex-direction: column-reverse; width: var(--key);
  transition: transform var(--fade);
}
.h.left  { left: 0; bottom: 0; transform: translateX(-100%); }
.h.right  { right: 0; bottom: 0; transform: translateX(100%); }
.h.on  { transform: none; }
.h button  {
  width: var(--key); height: var(--key); padding: 0; font: var(--key-emo)/var(--key) var(--emo);
  background: none; border: 0; opacity: var(--dim); cursor: pointer;
}
.h button[aria-pressed=true]  { opacity: 1; }
/* the 10C key stands proud: a little over its size, over the keys
beside it, with a glow (Scott, 2026-10-10: "prominent and very
slightly oversized and overtop the ones adjacent") */
.h [aria-label=tilt].deaf  { opacity: 0.35; text-decoration: line-through; }
.h [aria-label=craft]  {
  opacity: 1; position: relative; z-index: 2; transform: scale(1.6); transform-origin: center;
  filter: drop-shadow(0 0 4px #000) drop-shadow(0 0 6px #ffb34788);
}
/* the gear, smaller than the star (Scott, 2026-10-10) */
.h [aria-label=tools]  { transform: scale(0.75); }
.h svg  { display: block; width: var(--key); height: var(--key); color: var(--ink); }
.h .rose  {
  position: relative; display: block; width: var(--key); height: var(--key); -webkit-touch-callout: none;
  user-select: none;
}
.h .rose :is(svg, canvas)  {
  display: block; width: 100%; height: 100%; color: var(--ink); font-family: var(--mono);
}
.h .range  { font: bold var(--text)/var(--key) var(--mono); color: var(--ink); text-shadow: var(--halo); }
.h img  { display: block; width: var(--key); height: var(--key); }
.p  {
  position: fixed; bottom: calc(var(--up) * var(--cell)); width: var(--cell-2); height: var(--cell-2);
  padding: 0; font: var(--text-huge)/var(--cell-2) var(--emo); background: none; border: 0;
  touch-action: none; cursor: pointer;
}
.p.left  { left: calc(var(--across) * var(--cell)); }
.p[aria-pressed=false]  { opacity: var(--dim); }
.p.right  { right: calc(var(--across) * var(--cell)); }
.f  {
  position: fixed; bottom: 0; display: flex; flex-direction: column; width: var(--f-wide);
  height: var(--cell-6); background: var(--veil);
}
.f[hidden]  { display: none; }
.f.right  { right: calc(var(--key) + var(--f-wide) * var(--f-slot, 0)); }
.f.left  { left: calc(var(--key) + var(--f-wide) * var(--f-slot, 0)); }
.f .drum  {
  flex: 1;
  background: var(--f-shade), repeating-linear-gradient(var(--f-ridge) 0 var(--line), var(--f-drum) var(--line) var(--f-step));
  background-size: 100% 100%, 100% var(--f-step); border-left: var(--line) solid var(--f-ridge);
  border-right: var(--line) solid var(--f-ridge); touch-action: none; cursor: ns-resize;
}
.f button  {
  height: var(--cell); padding: 0; font: bold var(--text-big)/var(--cell) var(--mono); color: var(--ink);
  text-shadow: var(--halo); background: var(--f-key); border: 0; cursor: pointer;
}
.f button[aria-pressed=true]  {
  color: var(--f-lit-ink); text-shadow: none; background: var(--f-lit);
  box-shadow: 0 0 var(--half) var(--f-lit);
}
.f.across  { flex-direction: row; width: var(--cell-6); height: var(--cell-2); }
.f.across .drum  {
  background: var(--f-shade), repeating-linear-gradient(to right, var(--f-ridge) 0 var(--line), var(--f-drum) var(--line) var(--f-step));
  background-size: 100% 100%, var(--f-step) 100%; border-left: 0; border-right: 0;
  border-top: var(--line) solid var(--f-ridge); border-bottom: var(--line) solid var(--f-ridge);
  cursor: ew-resize;
}
/* the rear lever (lever: true): a tiller, 3 cells by 1, lying at
the foot beside the speed wheel's key at its height (Scott,
2026-10-10: "as tall as speedo, 32px"; slot 2's place is
overridden to sit right by it), no ridges, its stem standing where
the rear axle is put, left to right; the stem's head is lit */
.f.lever  { width: var(--cell-3); height: var(--cell); }
.f.lever.right  { right: calc(var(--key) + var(--cell-2)); }
.f.lever.left  { left: calc(var(--key) + var(--cell-2)); }
.f.lever .drum  {
  position: relative; background: var(--f-shade), linear-gradient(var(--f-drum), var(--f-drum));
  background-size: 100% 100%, 100% 100%; border-left: var(--line) solid var(--f-ridge);
  border-right: var(--line) solid var(--f-ridge); border-top: 0; border-bottom: 0; touch-action: none;
  cursor: ew-resize;
}
.f.lever .stem  {
  position: absolute; top: 0; bottom: 0; left: 50%; width: var(--cell); margin-left: calc(var(--cell) / -2);
  border-radius: var(--half); background: linear-gradient(var(--f-lit) 0 35%, var(--f-ridge) 35%);
  box-shadow: 0 0 var(--half) #000; pointer-events: none;
}
#rev  {
  position: fixed; top: 28%; left: 50%; transform: translateX(-50%); font: bold 96px/1 var(--mono);
  color: var(--ink); text-shadow: var(--halo), 0 0 24px #ffb347; opacity: 0.85; pointer-events: none;
  z-index: 3;
}
#rev[hidden]  { display: none; }
#dash  {
  position: fixed; left: 0; right: 0; bottom: 0; box-sizing: border-box;
  height: calc(var(--key) * var(--dash-rows)); background: var(--dash-face);
  border-top: var(--line) solid var(--dash-rim); pointer-events: none;
}
#dash[hidden]  { display: none; }
#dash canvas  { position: absolute; bottom: 0; display: block; }
#dash.right canvas  { left: 0; }
#dash.left canvas  { right: 0; }
.rest #c, .rest #rear, .rest #x, .rest #k, .rest #n, .rest .p, .rest .f, .rest #names, .rest #dash  { display: none; }
.w  {
  position: fixed; inset: 0; box-sizing: border-box; padding: var(--half) var(--cell);
  overflow: hidden auto; font: var(--text-big)/var(--cell-2) var(--mono); color: var(--ink);
  background: var(--veil); z-index: 4;
}
.w[hidden]  { display: none; }
.w header  { position: sticky; top: 0; background: var(--veil); }
.w header, .w p  {
  display: flex; flex-wrap: wrap; min-height: var(--cell-2); margin: 0; align-items: center;
  gap: var(--half);
}
.w .sw  { padding: 0; }
.w .sw .switch  { width: var(--key); height: var(--key); opacity: var(--dim); }
.w .sw .switch[aria-pressed=true]  { opacity: 1; }
.w .sw .switch svg, .w .sw .switch img  { width: var(--key); height: var(--key); }
.w header img  { width: var(--cell); height: var(--cell); }
.w header b  { flex: 1; }
.w header i  { font-style: normal; opacity: var(--dim); }
.w p  { padding: 0 var(--edge); }
.w p:has(button, a)  { padding: 0 0 0 var(--cell); }
.w button, .w a  {
  min-width: var(--cell-3); height: var(--cell-2); padding: 0; font: inherit; color: var(--ink);
  text-align: center; background: none; border: 0; opacity: var(--dim); cursor: pointer;
}
.w header button  { width: var(--cell); opacity: 1; }
.w p:has(input)  { padding: 0 var(--edge) 0 var(--cell); }
.w input  {
  flex: 1; min-width: 0; height: var(--cell); padding: 0 var(--edge); font: inherit; color: var(--ink);
  background: none; border: 0; border-bottom: var(--line) solid var(--ink-soft); border-radius: 0;
  outline: 0;
}
.w input:focus  { border-bottom-color: var(--ink); }
.w .gyro  { padding: 0 0 0 var(--cell); }
.w .gyro :is(svg, canvas)  {
  display: block; width: calc(var(--cell) * 5); height: calc(var(--cell) * 5); color: var(--ink);
  font-family: var(--mono);
}
.w .gyro p  { padding: 0; }
#pieces  { bottom: var(--cell-7); }
#pieces header span  { width: var(--cell); font: var(--emo-size)/var(--cell) var(--emo); text-align: center; }
#pieces table  { width: 100%; table-layout: fixed; border-collapse: collapse; }
#pieces th, #pieces td  { height: var(--cell); padding: 0; font-weight: normal; text-align: center; }
#pieces th:first-child, #pieces td:first-child  {
  width: var(--cell-2); text-align: left; padding: 0 0 0 var(--edge);
}
#pieces th:nth-child(2), #pieces td:nth-child(2)  { width: var(--cell); }
#pieces th  { opacity: var(--dim); }
#pieces td i  {
  display: inline-block; width: var(--edge); height: var(--half); margin: 0 0 0 var(--edge);
  vertical-align: middle;
}
#pieces td i + i  { margin: 0; }
#pieces .k0  { background: var(--k0); }
#pieces .k1  { background: var(--k1); }
#pieces .k2  { background: var(--k2); }
#pieces .k3  { background: var(--k3); }
#pieces td button  { width: 100%; opacity: 1; }
#pieces td button:disabled  { opacity: var(--dim); cursor: default; }
#names b  {
  position: fixed; left: 0; top: 0; height: var(--cell); margin: calc(var(--cell) * -1) 0 0;
  padding: 0 var(--half); font: var(--text)/var(--cell) var(--mono); color: var(--ink);
  background: var(--veil); white-space: nowrap; pointer-events: auto; cursor: pointer; translate: -50% 0;
  will-change: transform;
}
#names b[hidden]  { display: none; }
#roster  {
  position: fixed; left: 50%; top: 50%; translate: -50% -50%; max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 96px); overflow: auto; padding: var(--half) var(--cell);
  font: var(--text)/var(--cell) var(--mono); color: var(--ink); background: var(--veil); z-index: 7;
}
#roster b  { display: block; }
#roster p  { margin: 0; white-space: nowrap; }
#roster[hidden]  { display: none; }
.w a  { opacity: 1; text-decoration: underline; }
.w button[aria-pressed=true]  { opacity: 1; }
#e  {
  position: fixed; left: 50%; top: 50%; margin: calc(var(--cell-3) / -2) calc(var(--cell-3) * -2);
}
#e b  {
  float: left; width: var(--cell-3); height: var(--cell-3); font-size: var(--text-huge);
  line-height: var(--cell-3); opacity: var(--dim);
}
#e b.me  { border-width: var(--edge); line-height: calc(var(--cell-3) - 2 * var(--edge)); }
#e b.won  { opacity: 1; }
.front, .front body  {
  height: auto; overflow: auto; touch-action: auto; user-select: auto; -webkit-user-select: auto;
}
.front #o  { position: relative; height: var(--screen); }
#bench  {
  position: fixed; inset: 0; z-index: 9; margin: 0; padding: var(--cell); overflow: auto;
  font: var(--text)/var(--cell) var(--mono); color: var(--ink); background: var(--veil);
  white-space: pre-wrap;
}
#view-mask  {
  position: fixed; inset: 0; z-index: 9; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: var(--cell); color: var(--ink); background: var(--mask);
  font: var(--bold) var(--text-huge)/var(--cell) var(--mono);
}
#view-mask p  { margin: 0; }
#view-mask.dim  {
  justify-content: flex-start; flex-direction: row; padding-top: var(--cell); background: var(--mask-dim);
  font: var(--bold) var(--text)/var(--cell) var(--mono); text-shadow: var(--halo); pointer-events: none;
}
#view-mask.dim button  {
  width: var(--cell-2); height: var(--cell-2); font: var(--text)/var(--cell-2) var(--emo);
  pointer-events: auto;
}
#view-mask button  {
  width: var(--cell-3); height: var(--cell-3); padding: 0; font: var(--text-huge)/var(--cell-3) var(--emo);
  color: var(--ink); background: var(--veil); border: var(--line) solid var(--ink);
  border-radius: var(--half); cursor: pointer;
  animation: breathe var(--breath) ease-in-out infinite alternate;
}
@keyframes breathe  {
  from  {
    opacity: var(--dim);
  }
  to  {
    opacity: 1;
  }
}
.work  {
  margin: var(--cell); color-scheme: dark; background: var(--w-ground); color: var(--w-ink);
  font: var(--text-big)/var(--cell) var(--mono);
}
.work h1  { margin: 0; font-size: var(--text-huge); line-height: var(--cell-2); }
.work .row  {
  display: flex; flex-wrap: wrap; gap: var(--half); align-items: center; min-height: var(--cell-2);
}
.work button, .work select  {
  height: var(--cell); padding: 0 var(--half); background: var(--w-key); color: var(--w-ink);
  border: var(--line) solid var(--w-line); font: inherit; cursor: pointer;
}
.work button.on  { background: var(--w-lit); color: var(--w-ground); }
.work #view  {
  display: block; width: 100%; height: var(--w-view); margin: var(--half) 0;
  border: var(--line) solid var(--w-line); touch-action: none; cursor: crosshair;
}
.work label.key  {
  display: inline-flex; gap: var(--half); height: var(--cell); padding: 0 var(--half);
  background: var(--w-key); border: var(--line) solid var(--w-line); cursor: pointer;
}
.work label.key input  { position: absolute; opacity: 0; }
.work label.key:has(input:checked)  { background: var(--w-lit); color: var(--w-ground); }
.work kbd  { font: inherit; color: var(--w-hi); }
.work label.key:has(input:checked) kbd  { color: var(--w-ground); }
.work .hi  { color: var(--w-hi); }
.work #ws-name  {
  width: var(--cell-7); height: var(--cell); padding: 0 var(--half); background: var(--w-key);
  color: var(--w-ink); border: var(--line) solid var(--w-line); font: inherit;
}
.work #ws-line  {
  width: var(--cell-20); max-width: 100%; height: var(--cell-3); background: var(--w-key);
  color: var(--w-ink); border: var(--line) solid var(--w-line); font: var(--text)/var(--half) var(--mono);
}
.work #ws-saved .leaf  { grid-template-columns: var(--cell-6) 1fr auto auto; }
.work #garage section  { width: auto; max-width: var(--cell-20); margin-top: var(--cell); }
.work #garage h2  { margin: 0 0 var(--half); font-size: var(--text-big); }
.work .leaf  {
  display: grid; grid-template-columns: var(--cell-5) 1fr auto auto; gap: var(--half); align-items: center;
  min-height: var(--cell);
}
.work .leaf i  { font-style: normal; opacity: var(--dim); font-size: var(--text); }
.work .leaf img.unit-pic  {
  display: block; width: var(--w-pic); max-width: 100%; border: var(--line) solid var(--w-line);
}
.work .leaf.own span  { color: var(--w-lit); }
.work .leaf input, .work .leaf textarea  {
  min-width: 0; height: var(--cell); padding: 0 var(--half); background: var(--w-key); color: var(--w-ink);
  border: var(--line) solid var(--w-line); font: inherit;
}
.work .leaf input[type=checkbox]  { width: var(--cell); height: var(--cell); }
.work .leaf textarea  { height: var(--cell-2); }
.work #stages  { display: flex; flex-wrap: wrap; gap: var(--cell); margin-top: var(--cell); }
.work section  {
  width: var(--cell-12); padding: var(--half); background: var(--w-glass);
  border: var(--line) solid var(--w-line);
}
.work h2  {
  display: flex; gap: var(--half); align-items: center; margin: 0; height: var(--cell);
  font-size: var(--text-big); color: var(--w-hi);
}
.work h2 input  { width: var(--cell); height: var(--cell); margin: 0; }
.work label  {
  display: grid; grid-template-columns: var(--cell-5) 1fr var(--cell-2); align-items: center;
  height: var(--cell);
}
.work input[type=range]  { width: 100%; accent-color: var(--w-hi); }
.work output  { text-align: right; }
.work [hidden]  { display: none; }
.work #say  { margin: 0; }
.work #text  {
  box-sizing: border-box; width: var(--cell-12); height: var(--cell); padding: 0 var(--half);
  background: var(--w-glass); color: var(--w-ink); border: var(--line) solid var(--w-line); font: inherit;
}
/* Scott, ticket 135: "a 32px virtual rim around viewport at all times."
The picture fills the viewport; chrome overlays its reserved band. */
html  { --rim-top: 32px; --rim-bottom: 32px; }
#c  { height: 100dvh; margin-top: 0; }
body::after  {
  content: ''; position: fixed; inset: 0; border: 32px solid var(--rim-veil); box-sizing: border-box;
  pointer-events: none; z-index: 1;
}
html:not(.rim) :is(#rim-top, #rim-bottom, #rim-col, #rim-corner, .rim-handle, .rim-panel:not(.legacy-panel))  { display: none; }
html.rim #board  { display: none; }
#rim-top, #rim-bottom  {
  position: fixed; left: 0; right: 0; z-index: 8; display: flex; align-items: stretch;
  height: var(--rim-cell); overflow: hidden; font: var(--text)/var(--rim-cell) var(--mono);
  color: var(--ink); background: var(--rim-veil);
}
#rim-top  { top: 0; }
#rim-bottom  { bottom: 0; }
#rim-top > div, #rim-bottom > div  {
  display: flex; align-items: center; gap: var(--edge); min-height: var(--rim-cell);
}
.rim-m  { flex: 1; justify-content: flex-start; overflow: hidden; min-width: 0; }
.rim-l, .rim-r  {
  flex-wrap: nowrap; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
}
.rim-r  { justify-content: flex-end; }
#rim-bottom .rim-r  { flex: 0 1 auto; justify-content: flex-start; }
.rim-key  {
  position: relative; display: inline-block; flex: none; box-sizing: border-box; height: var(--rim-cell);
  min-width: var(--rim-cell); padding: 0 var(--rim-pad); border: 0; background: transparent;
  color: var(--ink-soft); font: inherit; line-height: var(--rim-cell); white-space: nowrap;
  text-decoration: none; cursor: pointer;
}
.rim-key :is(canvas, svg).rim-rose  { display: block; height: var(--rim-cell); width: var(--rim-cell); }
.rim-key input  { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.rim-key:has(input:checked), .rim-key[aria-pressed="true"], .rim-panel button[aria-pressed=true]  {
  color: var(--ink); background: var(--rim-lit); box-shadow: inset 0 calc(-1 * var(--line)) 0 var(--ink);
  opacity: 1;
}
.rim-key:has(input:focus-visible)  { outline: var(--line) solid var(--ring); }
.rim-key[hidden]  { display: none; }
.rim-notice  { padding: 0 var(--half); color: var(--f-lit); white-space: nowrap; }
.rim-notice:empty  { display: none; }
.rim-race  { padding: 0 var(--half); color: var(--f-lit); font-weight: bold; white-space: nowrap; }
.rim-race:empty  { display: none; }
.rim-seat, .rim-who, .rim-vin, .rim-dev, .rim-hw  {
  padding: 0 var(--half); color: var(--ink-soft); white-space: nowrap;
}
.rim-who  { color: var(--ink); }
.rim-who:empty, .rim-vin:empty, .rim-dev:empty, .rim-hw:empty  { display: none; }
.rim-who:not(:empty)::after, .rim-vin:not(:empty)::after, .rim-dev:not(:empty)::after, .rim-hw:not(:empty)::after, .rim-seat:not(:empty)::after  {
  content: ' ·'; opacity: var(--rim-n-dim);
}
.rim-swatch  {
  display: inline-block; width: var(--rim-swatch); height: var(--rim-swatch); border-radius: var(--rim-round);
  vertical-align: middle;
}
.rim-swatch[hidden]  { display: none; }
.w button.swatch, #tools button.swatch  {
  min-width: var(--rim-cell); width: var(--rim-cell); height: var(--rim-cell); padding: 0;
  border-radius: var(--rim-round);
}
button.swatch[aria-pressed=true]  { outline: var(--line) solid var(--ink); }
html.rim #x  { position: static; height: var(--rim-cell); text-shadow: none; }
html.rim #tools .switches  { display: none; }
html.rim #s  {
  display: block !important; position: static; left: auto; width: auto; text-align: left;
  background: transparent;
  /* scrolled, never cut: the line ended "ac..." (Scott, 2026-10-18:
  "all the info is usually behind ellipsis so totally worthless") */
  text-overflow: clip; overflow-x: auto; scrollbar-width: none;
}
@media (max-width: 720px)  {
  html.rim #s, html.rim .rim-vin  {
    display: none !important;
  }
  .rim-key  {
    padding: 0 var(--rim-pad-narrow);
  }
  #rim-top .rim-m  {
    flex: 0 1 auto;
  }
  #rim-top .rim-l  {
    flex: 1 1 0;
  }
}
#rim-col  {
  position: fixed; bottom: var(--rim-cell); display: flex; flex-direction: column-reverse;
  align-items: stretch; width: var(--rim-cell); z-index: var(--rim-z); text-align: center;
  background: var(--rim-veil); font: var(--text)/var(--rim-cell) var(--mono);
}
#rim-col .rim-key  { padding: 0; min-width: var(--rim-cell); justify-content: center; }
#rim-col.right, #rim-corner.right  { right: 0; }
#rim-col.left, #rim-corner.left  { left: 0; }
#rim-corner  {
  position: fixed; bottom: 0; z-index: var(--rim-z-corner); width: var(--rim-cell); height: var(--rim-cell);
  padding: 0; background: var(--rim-veil);
}
.rim-ribbon  { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; position: relative; }
.rim-tape  {
  display: inline-block; padding-left: 100%; color: var(--f-lit);
  animation: rim-tape var(--tape-s, 20s) linear infinite;
}
.rim-tape:empty  { animation: none; }
.rim-tape.stand  { animation: none; padding-left: var(--half); }
@keyframes rim-tape  {
  from  {
    transform: translateX(0);
  }
  to  {
    transform: translateX(-100%);
  }
}
.pro-text  {
  white-space: pre-wrap; font: var(--text)/1.4 var(--mono); color: var(--ink-soft); margin: 0;
  max-height: var(--pro-text-h); overflow: auto;
}
.rim-menu  { display: inline-flex; align-items: stretch; }
.rim-menu[hidden]  { display: none; }
.rim-n  {
  font-style: normal; color: var(--ink-soft); opacity: var(--rim-n-dim); padding-right: var(--rim-n-pad);
  font-size: var(--rim-n-size);
}
/* the row's items wear their word, no digit (Scott, 2026-10-16: "I
just want the item I can get to by clicking once or at most twice") */
#rim-top .rim-n  { display: none; }
html.rim-top-off #rim-top  { display: none; }
html.rim-left-off #rim-col.left, html.rim-right-off #rim-col.right  { display: none; }
/* the wheels are the column's: tucked away with it (Scott, 2026-10-16:
"the wheels are part of right-hand column") */
html.rim-left-off .f.left, html.rim-right-off .f.right  { display: none; }
html:not(.rim-left-off) #rim-h-left  { left: var(--rim-cell); }
html.rim-bottom-off #rim-bottom  { display: none; }
html.rim .rim-panel  {
  inset: auto; top: var(--rim-top, 0px); left: 0; width: var(--rim-panel-w); max-width: 100vw;
  max-height: calc(100dvh - var(--rim-top, 0px) - var(--rim-bottom, 0px)); box-sizing: border-box;
  padding: 0 var(--half) var(--half); overflow: hidden auto; overscroll-behavior: contain;
  background: var(--rim-veil); z-index: 7;
}
html.rim .rim-panel header  { min-height: var(--rim-cell); background: var(--rim-veil); }
html.rim .rim-panel header button  { min-width: var(--rim-cell); }
.rim-handle  {
  position: fixed; z-index: 8; width: calc(var(--rim-cell) * 2); height: var(--rim-handle); padding: 0;
  border: 0; background: var(--ring); opacity: .6; cursor: pointer;
}
.rim-handle:hover  { opacity: 1; }
#rim-h-top  {
  top: var(--rim-top, 0px); left: 50%; margin-left: calc(-1 * var(--rim-cell));
  border-radius: 0 0 var(--rim-round) var(--rim-round);
}
#rim-h-bottom  {
  bottom: var(--rim-bottom, 0px); left: 50%; margin-left: calc(-1 * var(--rim-cell));
  border-radius: var(--rim-round) var(--rim-round) 0 0;
}
#rim-h-left, #rim-h-right  {
  width: var(--rim-handle); height: calc(var(--rim-cell) * 2); top: 50%;
  margin-top: calc(-1 * var(--rim-cell));
}
#rim-h-left  { left: 0; border-radius: 0 var(--rim-round) var(--rim-round) 0; }
#rim-h-right  { right: 0; border-radius: var(--rim-round) 0 0 var(--rim-round); }
html:not(.rim-right-off) #rim-h-right  { right: var(--rim-cell); }
html.rim #dash  { bottom: var(--rim-bottom, 0px); }
html.rim #pieces  { bottom: calc(var(--cell-7) + var(--rim-bottom, 0px)); }
html.rim #pieces, html.rim #tools  { top: var(--rim-top, 0px); }
html.rim #tools  { bottom: var(--rim-bottom, 0px); }
html.ride #c  { height: calc(58dvh - var(--rim-top, 0px)); margin-top: var(--rim-top, 0px); }
#ride  {
  position: fixed; left: 0; right: 0; top: 58dvh; bottom: var(--rim-bottom, 0px); z-index: 7; display: flex;
  flex-direction: column; color: var(--ink); background: #05070b; border-top: 1px solid var(--ring);
  font: 12px/1.35 var(--mono);
}
html.rim:has(#rim-col.right) #ride  { right: var(--rim-cell); }
html.rim:has(#rim-col.left) #ride  { left: var(--rim-cell); }
/* the speed wheel stands on the status bar against the column (its
key was under the bar, and --key left a strip between them; Scott,
2026-10-16: "why gap between wheel and transmission notches?") */
html.rim .f  { bottom: calc(var(--rim-bottom, 0px) + var(--cell)); }
html.rim .f.right  { right: calc(var(--rim-cell) + var(--f-wide) * var(--f-slot, 0)); }
html.rim .f.left  { left: calc(var(--rim-cell) + var(--f-wide) * var(--f-slot, 0)); }
html.rim .f.lever  { bottom: var(--rim-bottom, 0px); }
html.rim .f.lever.right  { right: var(--rim-cell); }
html.rim .f.lever.left  { left: var(--rim-cell); }
html.rim:has(#rim-col.right) #rim-bottom  { right: var(--rim-cell); }
html.rim:has(#rim-col.left) #rim-bottom  { left: var(--rim-cell); }
#rim-bottom .rim-l  { flex: 1 1 0; overflow: hidden; }
#rim-bottom .rim-r  { flex: 0 0 auto; }
#rim-bottom .rim-r .rim-key  { padding: 0; }
html.rim-right-off #ride  { right: 0; }
html.rim-left-off #ride  { left: 0; }
@media (min-aspect-ratio: 4/3) and (min-width: 900px)  {
  html.ride.pane-auto #c  {
    width: 60vw; height: calc(100dvh - var(--rim-top, 0px) - var(--rim-bottom, 0px));
  }
  html.pane-auto #ride, html.pane-auto.rim:has(#rim-col.left) #ride  {
    left: 60vw; top: var(--rim-top, 0px); border-top: 0; border-left: 1px solid var(--ring);
  }
}
html.ride.pane-side #c  { width: 60vw; height: calc(100dvh - var(--rim-top, 0px) - var(--rim-bottom, 0px)); }
html.pane-side #ride, html.pane-side.rim:has(#rim-col.left) #ride  {
  left: 60vw; top: var(--rim-top, 0px); border-top: 0; border-left: 1px solid var(--ring);
}
html.ride.pane-off #c  {
  height: calc(100dvh - var(--rim-top, 0px) - var(--rim-bottom, 0px) - var(--rim-cell));
}
html.pane-off #ride  { top: auto; height: var(--rim-cell); }
.ride-keys  { display: flex; flex: none; flex-wrap: wrap; background: var(--rim-veil); }
.ride-keys .rim-key:has(input:checked)  {
  background: var(--rim-lit); color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink);
}
.ride-gap  { flex: 1; }
#ride-body  { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0 8px 6px; }
#ride-groups  { display: flex; flex-wrap: wrap; flex: none; }
#ride-groups .rim-key:has(input:checked)  {
  background: var(--rim-lit); color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink);
}
.ride-head  { flex: none; margin: 4px 0; color: var(--ink-soft); }
.ride-rows  { flex: 1; min-height: 0; overflow: auto; }
.ride-row  {
  display: grid; gap: 8px; padding: 1px 0; align-items: center; grid-template-columns: 12em 10em 1fr;
  color: var(--ink-soft);
}
/* wrapped, never cut (Scott, 2026-10-18: "all the info is usually behind
ellipsis so totally worthless") */
.ride-row span  { overflow-wrap: anywhere; }
.ride-spark  { width: 100%; height: 1.2em; }
.ride-row.holds span:nth-child(2)  { color: #aed581; }
.ride-row.fails span:nth-child(2)  { color: #ff8a65; }
.ride-spark polyline  {
  fill: none; stroke: var(--ink-soft); stroke-width: 1; vector-effect: non-scaling-stroke;
}
.ride-radio  { flex: 1; min-height: 0; }
.ride-radio[hidden]  { display: none; }
html.pane-off #ride #ride-body, html.pane-off #ride .ride-radio  { display: none; }
html.watching #k, html.watching #rim-col  { display: none; }
#notes  {
  position: fixed; left: 0; top: var(--rim-top, 0px); width: var(--notes-w); max-width: 70vw;
  box-sizing: border-box;
  max-height: min(var(--notes-tall), calc(100dvh - var(--rim-top, 0px) - max(var(--rim-bottom, 0px), var(--notes-foot, 0px))));
  overflow: hidden; z-index: var(--notes-z); pointer-events: none; background: var(--notes-veil);
  color: var(--ink); font: 12px/1.35 var(--mono);
}
#notes[hidden], #specimen[hidden]  { display: none; }
html.rim:has(#rim-col.left) #notes  { left: var(--rim-cell); }
#notes header  {
  display: flex; justify-content: space-between; align-items: center; padding-left: var(--rim-pad-narrow);
  color: var(--ink-soft);
}
#notes header button  {
  pointer-events: auto; min-width: var(--rim-cell); height: var(--rim-cell); background: none; border: 0;
  color: var(--ink);
}
#notes p  { margin: 0; padding: 2px var(--rim-pad-narrow); white-space: normal; overflow-wrap: anywhere; }
#notes p i  { font-style: normal; color: var(--f-lit); }
#specimen  {
  position: fixed; right: 0; top: var(--rim-top, 0px); margin: 0; width: var(--spec-w); max-width: 80vw;
  box-sizing: border-box;
  max-height: calc(100dvh - var(--rim-top, 0px) - max(var(--rim-bottom, 0px), var(--notes-foot, 0px)));
  overflow: hidden; z-index: var(--notes-z); pointer-events: none; padding: var(--rim-pad-narrow);
  background: var(--notes-veil); color: var(--ink); font: 12px/1.35 var(--mono); white-space: pre-wrap;
  overflow-wrap: anywhere;
}
html.rim:has(#rim-col.right) #specimen  { right: var(--rim-cell); }
@media (max-width: 720px)  {
  #notes  {
    --notes-tall: var(--notes-tall-narrow);
  }
  #specimen  {
    top: calc(var(--rim-top, 0px) + var(--notes-h, 0px));
  }
}
#rear  {
  position: fixed; inset: 0; width: 100vw; height: 100dvh; pointer-events: none; z-index: var(--rim-z);
}
#notes pre  { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; font: inherit; }
#roster  { white-space: pre-wrap; }
#pieces chrome-rows  { display: block; }
#pieces .stock-row  { display: flex; align-items: center; gap: var(--half); }
#pieces .stock-marks  { display: flex; gap: var(--line); }
#pieces .stock-marks i  { width: var(--half); height: var(--half); border-radius: 50%; }
#pieces [data-mark="0"]  { background: var(--red); }
#pieces [data-mark="1"]  { background: var(--yellow); }
#pieces [data-mark="2"]  { background: var(--blue); }
#pieces [data-mark="3"]  { background: var(--green); }
.f .drum  { background-position: 0 0, 0 var(--f-offset); }
.f.across .drum  { background-position: 0 0, var(--f-offset) 0; }
.f.lever .stem  { left: calc(50% + var(--f-position) * 40%); }
#tools .legacy-panel  {
  position: static; inset: auto; width: auto; max-height: none; margin: 0; overflow: visible;
}
.f.lever .stem  { left: calc(50% + var(--f-position) * (50% - var(--cell) / 2)); }
.rim-stopped  { color: var(--f-lit); white-space: normal; }

#binocular-strip { position: fixed; top: 32px; left: 50%; transform: translateX(-50%); z-index: 8; display: flex; }
#mask { position: fixed; inset: 0; z-index: 20; display: grid; place-content: center; text-align: center; background: #05060c; color: var(--ink); }
#mask.dim { background: #05060c66; pointer-events: none; }
#mask button { pointer-events: auto; }

.ui-60 { background: rgb(221,0,51); }
.ui-61 { background: rgb(255,255,0); }
.ui-62 { background: rgb(33,33,255); }
.ui-63 { background: rgb(0,119,33); }
.ui-64 { background: rgb(221,0,51); color: #fff; }
.ui-65 { background: rgb(255,255,0); color: #000; }
.ui-66 { background: rgb(33,33,255); color: #fff; }
.ui-67 { background: rgb(0,119,33); color: #fff; }

