/* flyovers & u-turns. Everything here is scoped to the game’s dialog, #hyd-flyovers, except the
   pixel font, which the board draws with: the site ships fonts/win95fa-latin-400-normal.woff2 (OFL,
   fonts/W95FA-OFL.txt) and this is the face that names it, so the release builder ships it. */
@font-face {
  font-family: 'Hyd W95FA';
  src: url('fonts/win95fa-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- The window: the site’s chrome, as hyd-pinball.css draws it, in the owner’s “aqua blue” (21 oct): the
   title bar takes the glass of the site’s blue aqua buttons (the places “play” button in
   hyd-desktop-refinement.css: #e3f5ff, #aed8f7, #78b5e2, #a2d2f5, rim #6896ba, ink #143f62) under this window’s
   own faint pinstripes, with the title in that button’s dark ink over a white emboss, and the frame is a thin
   line of the same blue. The round buttons, the menu bar and everything below are the site’s. On a phone the
   window is the whole screen: the blue bar, no frame. --- */
#hyd-flyovers {
  --hfu-silver: #d5d6d6;
  --hfu-ink: #222;
  --hfu-grey: #c0c0c0;
  --hfu-px: 'Hyd W95FA', 'Courier New', monospace;
  --hfu-vh: 100vh;
  box-sizing: border-box;
  /* as big as the screen allows, with the board square: the board’s side is the screen’s height less the 158 px
     above and below it (the 12 px margins, the frame, the title bar, menu, hint, padding and the board’s
     border), and the window is that side plus the 281 px beside it (the frame, padding, the gap and the
     240 px panel); a narrow screen gives the width instead */
  width: min(calc(100% - 24px), calc(var(--hfu-vh) + 123px));
  max-width: none;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 2px solid #78b5e2;
  border-radius: 7px 7px 3px 3px;
  background: var(--hfu-silver);
  color: var(--hfu-ink);
  box-shadow:
    0 0 0 1px #6896ba,
    0 15px 40px #15101980;
  font: 12px/1.4 var(--desktop-font, 'Lucida Grande', Tahoma, sans-serif);
  text-transform: lowercase;
  color-scheme: light;
}
/* the screen’s height less the browser’s own bars, where the browser can say it */
@supports (height: 100dvh) {
  #hyd-flyovers {
    --hfu-vh: 100dvh;
  }
}
#hyd-flyovers[open] {
  display: flex;
  flex-direction: column;
}
#hyd-flyovers::backdrop {
  background: #201c2b66;
}
#hyd-flyovers *,
#hyd-flyovers *::before,
#hyd-flyovers *::after {
  box-sizing: border-box;
}
#hyd-flyovers [hidden] {
  display: none !important;
}
#hyd-flyovers button {
  min-height: 32px;
  margin: 0;
  padding: 4px 10px;
  border: 1px solid #77787c;
  border-radius: 3px;
  background: linear-gradient(#f9f9f6 0%, #dededb 47%, #cecfce 49%, #dedfdd 100%);
  color: #292631;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 1px 0 0 #eeefed,
    inset -1px 0 0 #babbb9,
    0 1px 0 #ffffffa6;
  font: inherit;
  font-size: 11px;
  line-height: 1.15;
  text-transform: lowercase;
  text-shadow: 0 1px #fff9;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
}
#hyd-flyovers button:active {
  background: #b9bdc0;
  box-shadow:
    inset 0 1px 3px #4b46534d,
    0 1px #fff9;
}
#hyd-flyovers button:disabled,
#hyd-flyovers button[aria-disabled='true'] {
  opacity: 0.5;
  cursor: default;
}
#hyd-flyovers :is(button, input, svg, [tabindex]):focus-visible {
  outline: 3px solid #688ea5;
  outline-offset: 2px;
}
#hyd-flyovers .hfu-titlebar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  flex: none;
  align-items: center;
  min-height: 30px;
  padding: 3px 9px;
  border-bottom: 1px solid #6896ba;
  background:
    repeating-linear-gradient(0deg, #ffffff17 0 1px, #68686809 1px 2px),
    linear-gradient(#e3f5ff, #aed8f7 49%, #78b5e2 50%, #a2d2f5);
  box-shadow: inset 0 1px #fff;
}
#hyd-flyovers .hfu-titlebar h2 {
  margin: 0;
  color: #143f62;
  font: 700 12px/1.2 var(--desktop-font, 'Lucida Grande', Tahoma, sans-serif);
  text-align: center;
  text-shadow: 0 1px #fff8;
}
#hyd-flyovers .hfu-window-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-self: start;
}
#hyd-flyovers .hfu-titlebar > span {
  min-width: 0;
}
#hyd-flyovers .hfu-titlebar h2 {
  max-width: calc(100vw - 300px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#hyd-flyovers .hfu-window-controls button {
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  border: 1px solid #aa514a;
  border-radius: 50%;
  background: radial-gradient(ellipse at 40% 15%, #ffdcd4 0%, #ed867a 45%, #cf645c 74%, #f6a499 100%);
  color: #792f2a;
  box-shadow: inset 0 1px #ffece7, 0 1px #fffc;
  font: 16px/1 Arial, sans-serif;
  text-shadow: none;
}
#hyd-flyovers .hfu-window-controls .hfu-minimise {
  border-color: #a17a2b;
  color: #6b4a0a;
  background: radial-gradient(ellipse at 40% 15%, #fff3c0, #f2ce65 45%, #d7a637 74%, #ffe292);
}
#hyd-flyovers .hfu-menubar {
  display: flex;
  flex: none;
  align-items: center;
  gap: 5px;
  min-height: 42px;
  padding: 5px 11px;
  border-bottom: 1px solid #a1a2a4;
  background: #dedfdd;
  box-shadow:
    inset 0 1px #f4f4f2,
    0 1px #f4f4f2;
}
#hyd-flyovers .hfu-menubar button {
  min-width: 67px;
}
#hyd-flyovers .hfu-menubar .hfu-help {
  margin-left: auto;
}

/* --- The body: the board, and the game’s own windows 95 panel --- */
#hyd-flyovers .hfu-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 11px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 11px;
  overflow: auto;
  overscroll-behavior: contain;
}
#hyd-flyovers .hfu-board-wrap {
  position: relative;
  align-self: start;
  border: 2px solid #1a1a1a;
  background: #f6edd5;
  box-shadow: 3px 3px 0 #0005;
  line-height: 0;
}
#hyd-flyovers .hyd-flyovers-board {
  display: block;
  width: 100%;
  height: auto;
  cursor: default;
}
#hyd-flyovers .hfu-side {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* as tall as the board beside it and never taller (its size is not its content’s): a panel crowded on a
     short screen, with six players, both closures, an orr choice and a road move at once, scrolls in itself */
  contain: size;
  min-height: 0;
  padding: 10px;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--hfu-grey);
  box-shadow:
    inset -1px -1px #0a0a0a,
    inset 1px 1px #fff,
    inset -2px -2px #808080,
    inset 2px 2px #dfdfdf;
  color: #000;
  font: 13px/1.3 var(--hfu-px);
  text-transform: none;
}
#hyd-flyovers .hfu-side p {
  margin: 0;
}
/* the panel’s pieces keep their own heights (a crowded panel scrolls instead of squeezing the die) */
#hyd-flyovers .hfu-side > *,
#hyd-flyovers .hfu-controls > * {
  flex: none;
}
#hyd-flyovers .hfu-controls {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* the go’s sixes: three boxes in a column beside the die, a 6 in each so far (hidden before the first) */
#hyd-flyovers .hfu-sixes {
  position: absolute;
  top: 5px;
  left: calc(50% + 32px);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#hyd-flyovers .hfu-sixes i {
  display: grid;
  place-items: center;
  width: 14px;
  height: 15px;
  border: 1px solid #000;
  background: #fff;
  box-shadow: inset -1px -1px #808080;
  color: #fff;
  font: 12px/1 var(--hfu-px);
  font-style: normal;
}
#hyd-flyovers .hfu-sixes i:not(:empty) {
  background: #d8261c;
  box-shadow: inset -1px -1px #8b130c;
}
#hyd-flyovers .hfu-seats {
  margin: 0;
  padding: 2px;
  list-style: none;
  background: #fff;
  box-shadow:
    inset -1px -1px #fff,
    inset 1px 1px #808080,
    inset -2px -2px #dfdfdf,
    inset 2px 2px #0a0a0a;
}
#hyd-flyovers .hfu-seats li {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 3px 4px;
}
#hyd-flyovers .hfu-seats li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* the seat’s piece in its colour, drawn small by the board’s own art */
#hyd-flyovers .hfu-mini {
  display: block;
  width: 22px;
  height: 20px;
  overflow: visible;
}
/* the name, then the seat’s icons, on one line: a long name gives way with …, never the icons */
#hyd-flyovers .hfu-seats .hfu-who {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
#hyd-flyovers .hfu-seats .hfu-name {
  min-width: 0;
}
#hyd-flyovers .hfu-seats li b {
  font-weight: 400;
  font-size: 15px;
}
#hyd-flyovers .hfu-seats li[aria-current] {
  background: #000080;
  color: #fff;
}
/* a seat’s icons, its words inside for screen readers and as a tooltip: a stop sign for a miss owed (red, a white bar,
   a black rim, as the piece wears it), a green ticket for a pass held, a grey dot for a phone away (online) */
#hyd-flyovers .hfu-icon {
  position: relative;
  display: block;
  flex: none;
  width: 13px;
  height: 13px;
}
#hyd-flyovers .hfu-icon-skip {
  background: #1a1a1a;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}
#hyd-flyovers .hfu-icon-skip::before {
  content: '';
  position: absolute;
  inset: 1.5px;
  background: #d8261c;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
}
#hyd-flyovers .hfu-icon-skip::after {
  content: '';
  position: absolute;
  top: 5.5px;
  left: 3px;
  width: 7px;
  height: 2px;
  background: #fff;
}
#hyd-flyovers .hfu-icon-pass {
  width: 17px;
  height: 11px;
  border: 1px solid #000;
  background: #2fa84f;
}
#hyd-flyovers .hfu-icon-pass::before {
  content: '';
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: 4px;
  border-left: 1px dotted #ffffffcc;
}
#hyd-flyovers .hfu-icon-pass::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 8px;
  width: 3px;
  height: 6px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(40deg);
}
#hyd-flyovers .hfu-icon-offline {
  width: 11px;
  height: 11px;
  border: 1px solid #000;
  border-radius: 50%;
  background: #c0c0c0;
}
/* “skipped”, stamped over a seat while the note of its missed go is up */
#hyd-flyovers .hfu-stamp {
  position: absolute;
  inset: 1px 16% 1px 24px;
  display: grid;
  place-items: center;
  border: 2px solid #d8261c;
  background: #ffffffd9;
  color: #d8261c;
  font: 14px/1 var(--hfu-px);
  letter-spacing: 1px;
  transform: rotate(-4deg);
  pointer-events: none;
}
/* a lobby seat’s tags (“you”, “host”): a windows 95 tooltip’s pale yellow tag */
#hyd-flyovers .hfu-badge {
  display: inline-block;
  margin-left: 1px;
  padding: 0 3px;
  border: 1px solid #000;
  background: #ffffe1;
  color: #000;
  font: 10px/12px var(--hfu-px);
  vertical-align: 1px;
}
/* what is shut and for how long, one line each, marked with the board’s shut red */
#hyd-flyovers .hfu-closures {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  line-height: 1.3;
}
#hyd-flyovers .hfu-closures li {
  position: relative;
  padding-left: 15px;
}
#hyd-flyovers .hfu-closures li::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 0;
  width: 9px;
  height: 9px;
  border: 1px solid #000;
  background: #c6362f;
}
#hyd-flyovers .hfu-die {
  position: relative;
  align-self: center;
  width: 52px;
  height: 52px;
  margin: 4px 0;
  perspective: 360px;
  isolation: isolate;
  /* it only shows the roll: a tumbling cube never takes a press meant for the button beside it */
  pointer-events: none;
}
#hyd-flyovers .hfu-die:not([data-die]) {
  border: 2px solid #000;
  border-radius: 8px;
  background: #fff;
  box-shadow: 3px 3px 0 #0006;
}
#hyd-flyovers .hfu-die[data-die]::before {
  content: '';
  position: absolute;
  left: 6px;
  bottom: 1px;
  width: 42px;
  height: 7px;
  border-radius: 50%;
  background: #0005;
  filter: blur(2px);
  transform: scale(calc(1 + var(--die-lift, 0px) / 18px));
}
#hyd-flyovers .hfu-cube {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 44px;
  height: 44px;
  transform-style: preserve-3d;
}
#hyd-flyovers .hfu-face {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  border: 2px solid #6b6460;
  border-radius: 6px;
  background: #fff;
  box-shadow: inset 0 0 5px #0002;
  backface-visibility: hidden;
}
#hyd-flyovers .hfu-face-1 { transform: translateZ(22px); }
#hyd-flyovers .hfu-face-6 { transform: rotateY(180deg) translateZ(22px); background: #e9e7e4; }
#hyd-flyovers .hfu-face-2 { transform: rotateY(90deg) translateZ(22px); background: #f1efec; }
#hyd-flyovers .hfu-face-5 { transform: rotateY(-90deg) translateZ(22px); background: #f1efec; }
#hyd-flyovers .hfu-face-3 { transform: rotateX(90deg) translateZ(22px); }
#hyd-flyovers .hfu-face-4 { transform: rotateX(-90deg) translateZ(22px); background: #e9e7e4; }
#hyd-flyovers .hfu-pip {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d4251c;
  transform: translate(-50%, -50%);
}
#hyd-flyovers .hfu-pip-1 { left: 27%; top: 27%; }
#hyd-flyovers .hfu-pip-3 { left: 73%; top: 27%; }
#hyd-flyovers .hfu-pip-4 { left: 27%; top: 50%; }
#hyd-flyovers .hfu-pip-5 { left: 50%; top: 50%; }
#hyd-flyovers .hfu-pip-6 { left: 73%; top: 50%; }
#hyd-flyovers .hfu-pip-7 { left: 27%; top: 73%; }
#hyd-flyovers .hfu-pip-9 { left: 73%; top: 73%; }
#hyd-flyovers .hfu-side button {
  min-height: 28px;
  border: 0;
  border-radius: 0;
  background: var(--hfu-grey);
  box-shadow:
    inset -1px -1px #0a0a0a,
    inset 1px 1px #fff,
    inset -2px -2px #808080,
    inset 2px 2px #dfdfdf;
  color: #000;
  font: 12px var(--hfu-px);
  text-transform: none;
  text-shadow: none;
  white-space: normal;
}
#hyd-flyovers .hfu-side button:active {
  box-shadow:
    inset -1px -1px #fff,
    inset 1px 1px #0a0a0a,
    inset -2px -2px #dfdfdf,
    inset 2px 2px #808080;
}
#hyd-flyovers .hfu-side .hfu-roll {
  min-height: 36px;
  outline: 1px solid #000;
  outline-offset: -5px;
  font-size: 13px;
}
/* its inner line outranks the shared focus ring, so it has its own */
#hyd-flyovers .hfu-side .hfu-roll:focus-visible {
  outline: 3px solid #688ea5;
  outline-offset: 2px;
}
#hyd-flyovers .hfu-group {
  position: relative;
  margin-top: 6px;
  padding: 12px 8px 8px;
  border: 1px solid #808080;
  box-shadow:
    1px 1px 0 #fff,
    inset 1px 1px 0 #fff;
  font-size: 12px;
  line-height: 1.35;
}
#hyd-flyovers .hfu-group > span {
  position: absolute;
  top: -8px;
  left: 8px;
  padding: 0 4px;
  background: var(--hfu-grey);
}
#hyd-flyovers .hfu-group p + p {
  margin-top: 6px;
}
#hyd-flyovers .hfu-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 8px;
}
/* the latest lines, the newest first and the older ones quieter: three here (a phone held upright shows as many as
   fit) */
#hyd-flyovers .hfu-said {
  min-height: 1.3em;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #333;
  font-size: 12px;
}
#hyd-flyovers .hfu-said > li:nth-child(n + 4) {
  display: none;
}
#hyd-flyovers .hfu-said > li:first-child {
  color: #000;
}
#hyd-flyovers .hfu-said > li + li {
  margin-top: 4px;
  color: #5d6068;
}
#hyd-flyovers .hfu-watch {
  text-align: left;
}
#hyd-flyovers .hfu-key {
  display: grid;
  gap: 3px;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
  font-size: 11.5px;
}
#hyd-flyovers .hfu-key li {
  display: flex;
  align-items: center;
  gap: 7px;
}
#hyd-flyovers :is(.hfu-key, .hfu-keyline) i {
  flex: none;
  width: 22px;
  height: 10px;
  border: 1.5px solid #1a1a1a;
}
#hyd-flyovers :is(.hfu-key, .hfu-keyline) .hfu-k-metro { background: repeating-linear-gradient(90deg, #e2231a 0 4px, #fff 4px 6px); }
#hyd-flyovers :is(.hfu-key, .hfu-keyline) .hfu-k-uturn { border-radius: 0 6px 6px 0; background: #4a4a4c; }
#hyd-flyovers :is(.hfu-key, .hfu-keyline) .hfu-k-flyover { border-radius: 6px; background: #d3cfc6; }
#hyd-flyovers :is(.hfu-key, .hfu-keyline) .hfu-k-exit { border-radius: 2px; background: #0b7a3e; }
#hyd-flyovers :is(.hfu-key, .hfu-keyline) .hfu-k-signal { width: 8px; height: 14px; margin: 0 7px; background: linear-gradient(#ff3b2f 0 33%, #111 33%); }
#hyd-flyovers :is(.hfu-key, .hfu-keyline) .hfu-k-player { width: 14px; height: 14px; margin: 0 4px; border: 2.5px solid #2f6fd6; background: #fff3cf; }
/* the key’s one row, six swatches with a word each: a phone’s held upright, where the full key doesn’t fit */
#hyd-flyovers .hfu-keyline {
  display: none;
}
#hyd-flyovers .hfu-hint {
  flex: none;
  margin: 0;
  padding: 6px 10px 8px;
  border-top: 1px solid #b4b5ba;
  background: #d0d1d1;
  color: #55545b;
  font-size: 10.5px;
  text-align: center;
  /* one line always, so the board’s side above stays what the window’s width allows */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#hyd-flyovers .hfu-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Sheets: drop from under the menu bar, like the desk’s alerts --- */
#hyd-flyovers .hfu-sheet {
  position: absolute;
  top: 72px;
  left: 50%;
  z-index: 5;
  width: min(380px, calc(100% - 24px));
  max-height: calc(100% - 84px);
  overflow: auto;
  padding: 14px 16px 12px;
  border: 1px solid #8a8a8e;
  border-top: 0;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(#f6f6f5, #e5e5e4);
  box-shadow:
    0 12px 30px #0008,
    inset 0 1px #fff;
  transform: translateX(-50%);
  line-height: 1.35;
}
#hyd-flyovers .hfu-sheet h3 {
  margin: 0 0 8px;
  font: 700 13px var(--desktop-font, 'Lucida Grande', Tahoma, sans-serif);
}
#hyd-flyovers .hfu-sheet p {
  margin: 0 0 6px;
}
/* the sticker, the words, and the card’s chip beside them */
#hyd-flyovers .hfu-card {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 3px 12px;
}
#hyd-flyovers .hfu-card img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  filter: drop-shadow(0 3px 3px #0004);
}
#hyd-flyovers .hfu-card .hfu-k {
  color: #6a6970;
  font-size: 10px;
}
#hyd-flyovers .hfu-card .hfu-l {
  font-weight: 700;
  font-size: 13px;
}
#hyd-flyovers .hfu-card .hfu-e {
  text-wrap: balance;
}
/* the card’s chip: what it does, big, on a flat colour with a black line and a hard shadow */
#hyd-flyovers .hfu-chip {
  display: grid;
  align-self: start;
  justify-items: center;
  min-width: 64px;
  padding: 4px 5px 5px;
  border: 2px solid #1a1a1a;
  background: #ffd23f;
  box-shadow: 3px 3px 0 #0006;
  color: #1a1a1a;
  font-family: var(--hfu-px);
  text-transform: none;
}
#hyd-flyovers .hfu-chip b {
  font-weight: 400;
  font-size: 28px;
  line-height: 30px;
}
#hyd-flyovers .hfu-chip span {
  font-size: 11px;
  line-height: 13px;
  white-space: nowrap;
}
#hyd-flyovers .hfu-chip[data-tone='good'] {
  background: #6fd36a;
}
#hyd-flyovers .hfu-chip[data-tone='bad'] {
  background: #e33b2e;
  color: #fff;
}
#hyd-flyovers .hfu-chip[data-tone='rain'] {
  background: #5aa6ff;
}
#hyd-flyovers .hfu-chip[data-tone='orr'] {
  background: #ff8a1f;
}
/* a narrow phone: the chip under the sticker, so the words keep their width */
@media (max-width: 400px) {
  #hyd-flyovers .hfu-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }
  #hyd-flyovers .hfu-card img {
    width: 72px;
    height: 72px;
  }
  #hyd-flyovers .hfu-card > div:not(.hfu-chip) {
    grid-row: span 2;
  }
  #hyd-flyovers .hfu-chip {
    grid-column: 1;
    min-width: 0;
    margin-top: 4px;
  }
}
#hyd-flyovers .hfu-card button {
  grid-column: 1 / -1;
  justify-self: end;
  min-width: 76px;
  font-weight: 700;
}
#hyd-flyovers .hfu-setup ol {
  display: grid;
  gap: 6px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}
/* each row: its piece button, the name, remove */
#hyd-flyovers .hfu-setup li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
#hyd-flyovers .hfu-online input,
#hyd-flyovers .hfu-setup input {
  height: 30px;
  padding: 5px 8px;
  border: 1px solid #8f9197;
  border-radius: 2px;
  background: #fff;
  box-shadow: inset 0 1px 2px #0002;
  font: 12px var(--desktop-font, 'Lucida Grande', Tahoma, sans-serif);
  color: #222;
}
#hyd-flyovers .hfu-setup input[readonly] {
  background: #f4f2ec;
  box-shadow: none;
  color: #4a4950;
}
#hyd-flyovers .hfu-setup .hfu-pair {
  margin: 0 0 8px;
}
#hyd-flyovers .hfu-setup > p {
  color: #5a5b62;
  font-size: 11px;
}
#hyd-flyovers .hfu-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 8px;
}
#hyd-flyovers .hfu-foot span {
  margin-right: auto;
  color: #5a5b62;
}
#hyd-flyovers .hfu-default {
  font-weight: 700;
}
#hyd-flyovers .hfu-slip {
  width: 250px;
  margin: 6px auto 10px;
  padding: 14px 14px 18px;
  background: #fbfaf6;
  color: #26282d;
  box-shadow: 0 6px 14px #0006;
  font: 13px/1.38 var(--hfu-px);
  text-transform: none;
  -webkit-mask: radial-gradient(circle at 6px 100%, transparent 5px, #000 5.5px) 0 0 / 12px 100% repeat-x;
  mask: radial-gradient(circle at 6px 100%, transparent 5px, #000 5.5px) 0 0 / 12px 100% repeat-x;
}
#hyd-flyovers .hfu-slip p {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
}
#hyd-flyovers .hfu-slip p:first-child {
  justify-content: center;
  color: #c6362f;
  font-size: 15px;
}
#hyd-flyovers .hfu-slip p:nth-child(2),
#hyd-flyovers .hfu-slip p:nth-child(3) {
  justify-content: center;
}
#hyd-flyovers .hfu-slip p:nth-child(3) {
  padding-bottom: 8px;
  border-bottom: 1.5px dashed #8a8d94;
  margin-bottom: 8px;
  color: #5d6068;
}
#hyd-flyovers .hfu-slip .hfu-sub {
  padding-left: 10px;
  color: #5d6068;
  font-size: 12px;
}
#hyd-flyovers .hfu-howto ul {
  margin: 0 0 8px;
  padding-left: 16px;
}

/* --- How to play (offline or online) and play online (start a room or join a room): two big buttons side by side,
   the window’s own buttons made large. A foot whose only button is hidden (the question’s cancel, with nothing under
   it) takes no room. --- */
#hyd-flyovers .hfu-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 4px 0 0;
}
#hyd-flyovers .hfu-choice button {
  min-height: 64px;
  font-size: 14px;
}
#hyd-flyovers .hfu-foot:not(:has(> button:not([hidden]))) {
  display: none;
}

/* --- Online: the start and join sheets, the room’s lobby and its status, in the window’s own pieces (Gate A’s lobby
   mock): the sheet, the players sheet’s fields, the panel’s white list, and the board’s pixel face for the code. --- */
#hyd-flyovers .hfu-label {
  display: block;
  margin: 8px 0 4px;
  font-weight: 700;
}
#hyd-flyovers .hfu-online input {
  width: 100%;
  min-width: 0;
  margin: 0 0 8px;
}
#hyd-flyovers .hfu-online .hfu-code-field {
  width: 100%;
  height: 44px;
  margin: 0 0 4px;
  font: 24px/1 var(--hfu-px);
  letter-spacing: 0.3em;
}
#hyd-flyovers .hfu-online .hfu-fine,
#hyd-flyovers .hfu-online > p:not([class]) {
  color: #5a5b62;
  font-size: 11px;
}
#hyd-flyovers .hfu-note {
  color: #26282d;
}
#hyd-flyovers .hfu-note:empty {
  display: none;
}
/* the rooms this phone still holds a seat in, above play online’s two buttons, under a dashed rule as the slip’s */
#hyd-flyovers .hfu-rooms {
  display: grid;
  justify-items: start;
  gap: 6px;
  margin: 0 0 10px;
  padding: 0 0 10px;
  border-bottom: 1.5px dashed #8a8d94;
}
#hyd-flyovers .hfu-rooms p {
  margin: 0;
}
#hyd-flyovers .hfu-letters {
  font-family: var(--hfu-px);
  letter-spacing: 0.08em;
}
#hyd-flyovers .hfu-room-code {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 6px;
}
#hyd-flyovers .hfu-sheet .hfu-code {
  margin: 0;
  font: 400 38px/1 var(--hfu-px);
  letter-spacing: 0.34em;
  white-space: nowrap;
}
/* the room code, and the code in the link shown, in capitals as the qr code has them: the site lowercases every text
   with !important in its mapping-copy layer (hyd-mapping.css), and an opt-out lives in that same layer */
@layer mapping-copy {
  #hyd-flyovers .hfu-caps {
    text-transform: none !important;
  }
}
#hyd-flyovers .hfu-qr {
  display: block;
  border: 1px solid #8f9197;
  background: #fff;
}
#hyd-flyovers .hfu-sheet .hfu-room-link {
  margin: 0 0 6px;
  font: 12px var(--hfu-px);
  overflow-wrap: anywhere;
}
#hyd-flyovers .hfu-share {
  display: flex;
  gap: 5px;
}
#hyd-flyovers .hfu-share button {
  flex: 1 1 0;
}
/* the seats keep the panel’s white list (not the players sheet’s rows of fields) */
#hyd-flyovers .hfu-roomseats {
  margin: 8px 0;
  padding: 2px;
  list-style: none;
  background: #fff;
  box-shadow:
    inset -1px -1px #fff,
    inset 1px 1px #808080,
    inset -2px -2px #dfdfdf,
    inset 2px 2px #0a0a0a;
  color: #000;
  font: 13px/1.3 var(--hfu-px);
}
/* each seat: its lamp, its piece, the name, online or not, and the host’s remove */
#hyd-flyovers .hfu-roomseats li {
  display: grid;
  grid-template-columns: 14px auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 2px 4px;
}
#hyd-flyovers .hfu-roomseats li i {
  width: 12px;
  height: 12px;
  border: 1.5px solid #000;
  border-radius: 50%;
  background: var(--seat, #fff);
}
#hyd-flyovers .hfu-roomseats .hfu-unlit {
  visibility: hidden;
}
#hyd-flyovers .hfu-roomseats span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#hyd-flyovers .hfu-roomseats .hfu-empty {
  color: #6a6970;
}
#hyd-flyovers .hfu-roomseats b {
  font-weight: 400;
  font-size: 12px;
}
#hyd-flyovers .hfu-roomseats li > button:not(.hfu-seat-piece) {
  min-height: 22px;
  padding: 0 6px;
  font-size: 11px;
}
#hyd-flyovers .hfu-lobby .hfu-pair {
  margin: 0 0 8px;
}
#hyd-flyovers .hfu-lobby .hfu-foot span {
  font-size: 11px;
  line-height: 1.3;
}
#hyd-flyovers .hfu-end .hfu-note {
  margin: 0;
  text-align: center;
}
/* the room’s score on the slip, under a dashed rule as the trip is */
#hyd-flyovers .hfu-slip .hfu-score {
  justify-content: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1.5px dashed #8a8d94;
  color: #5d6068;
}
/* online, the last 15 s of this phone’s go: a windows 95 progress bar’s navy along the foot of its roll (or its orr
   choice), as long as the time left */
#hyd-flyovers .hfu-side .hfu-roll {
  position: relative;
}
#hyd-flyovers .hfu-side [data-clock]::after {
  content: '';
  position: absolute;
  left: 8px;
  bottom: 8px;
  width: calc((100% - 16px) * var(--hfu-clock, 1));
  height: 4px;
  background: #000080;
}
/* on the orr choice the bar runs under take and stay, in room made for it */
#hyd-flyovers .hfu-side [data-flyovers-orr][data-clock] {
  padding-bottom: 14px;
}
#hyd-flyovers .hfu-side [data-flyovers-orr][data-clock]::after {
  bottom: 4px;
}
#hyd-flyovers .hfu-howto .hfu-quiet {
  color: #5a5d64;
}

/* --- Touch screens: 44 px targets, on a phone held either way and on a tablet (a phone held upright has more
   below). --- */
@media (pointer: coarse), (max-width: 620px) {
  #hyd-flyovers button,
  #hyd-flyovers .hfu-side button,
  #hyd-flyovers .hfu-close {
    min-width: 44px;
    min-height: 44px;
  }
  #hyd-flyovers .hfu-close {
    width: 44px;
    height: 44px;
  }
  #hyd-flyovers .hfu-side .hfu-roll {
    min-height: 44px;
  }
  #hyd-flyovers .hfu-titlebar {
    grid-template-columns: 1fr auto 1fr;
  }
  #hyd-flyovers .hfu-online input,
  #hyd-flyovers .hfu-setup input {
    min-width: 0;
    height: 44px;
  }
  #hyd-flyovers .hfu-roomseats li > button:not(.hfu-seat-piece) {
    min-height: 44px;
  }
}

/* --- Phones held upright: the window is the screen a person can see, and nothing in it scrolls. Top to bottom: the
   title bar and the menu, compact (their phone rules, shared with a phone held sideways, are at the end; below 680 px
   tall the menu folds into the title bar); the players in a strip; the board, as wide as the screen, or smaller and
   centred on a short screen; the newest of the latest lines, with its ▾ to the history; any height left over, where
   the key shows when all of it fits (the window measures it: how to play has it too); and at the foot, under the
   thumb, a compact bar with the die, the go’s sixes and the roll (or the orr choice). The closures’ lines stay on a
   laptop (the board’s signs show them). 44 px targets. --- */
@media (max-width: 620px) {
  #hyd-flyovers {
    --hfu-pad: 6px;
    width: 100%;
    /* the window sets --hfu-visible from the visual viewport as it opens and as that changes: iOS Safari’s 100dvh can
       run under its own toolbar (WebKit bug 281063) */
    height: 100vh;
    height: 100svh;
    height: var(--hfu-visible, 100svh);
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  /* one row of menu buttons, sharing the width; their targets begin where the discs’ targets end, 44 px down */
  #hyd-flyovers .hfu-menubar {
    gap: 4px;
    min-height: 0;
    padding: 7px var(--hfu-pad) 0;
    overflow-x: auto;
  }
  #hyd-flyovers .hfu-menubar button {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 6px;
  }
  #hyd-flyovers .hfu-menubar .hfu-help {
    margin-left: 0;
  }
  #hyd-flyovers button,
  #hyd-flyovers .hfu-side button,
  #hyd-flyovers .hfu-close {
    min-height: 44px;
  }
  /* the name fields are 44 px targets too */
  #hyd-flyovers .hfu-online input,
  #hyd-flyovers .hfu-setup input {
    height: 44px;
  }
  #hyd-flyovers .hfu-close {
    width: 44px;
    height: 44px;
    border-radius: 50%;
  }
  /* One grid for the body: the panel and its controls hand their pieces to it, so that the latest line sits under
     the board and the die and the roll at the foot. The board asks for its full width as its height but takes no more
     than is left once the rest has theirs (it shrinks); the key’s row takes any height left over, and the bar at the
     foot only its own. */
  #hyd-flyovers .hfu-body {
    grid-template-columns: auto auto minmax(0, 1fr);
    grid-template-rows: auto minmax(0, auto) auto auto minmax(0, auto) minmax(0, 1fr) auto;
    grid-template-areas:
      'seats seats seats'
      'board board board'
      'said said said'
      'watch watch watch'
      'moved moved moved'
      'key key key'
      'die sixes roll';
    gap: 0; /* the bar spaces its die and sixes with margins, so the sixes’ column costs nothing while it is hidden */
    padding: var(--hfu-pad) var(--hfu-pad) 0;
    overflow: hidden;
  }
  #hyd-flyovers .hfu-side,
  #hyd-flyovers .hfu-controls {
    display: contents;
  }
  /* the panel behind the latest line, and the bar behind the die and the roll: the windows 95 grey of the laptop’s
     panel, drawn by the body itself */
  #hyd-flyovers .hfu-body::before,
  #hyd-flyovers .hfu-body::after {
    content: '';
    background: var(--hfu-grey);
    box-shadow:
      inset -1px -1px #0a0a0a,
      inset 1px 1px #fff,
      inset -2px -2px #808080,
      inset 2px 2px #dfdfdf;
  }
  #hyd-flyovers .hfu-body::before {
    grid-area: 3 / 1 / 6 / -1;
    margin-top: 6px;
  }
  #hyd-flyovers .hfu-body::after {
    z-index: 0;
    grid-area: 7 / 1 / 8 / -1;
    margin: 6px calc(-1 * var(--hfu-pad)) 0;
  }
  /* the players: a full-width strip, three to a row (two for two or four players) */
  #hyd-flyovers .hfu-seats {
    grid-area: seats;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    font: 14px/16px var(--hfu-px);
  }
  #hyd-flyovers .hfu-seats:has(> li:nth-child(2):last-child),
  #hyd-flyovers .hfu-seats:has(> li:nth-child(4):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #hyd-flyovers .hfu-seats li {
    position: relative;
    gap: 5px;
    padding: 5px 6px;
  }
  #hyd-flyovers .hfu-seats li b {
    font-size: 16px;
  }
  #hyd-flyovers .hfu-mini {
    height: 18px;
  }
  /* the board edge to edge: no frame, and none of the window’s side padding, so its drawing runs the full width
     of the screen. Its row asks for a square (the drawing’s height at the full width) and takes less on a screen too
     short for that: the svg fills the row, and its drawing, which keeps its shape, is as tall as the row and centred
     across it. (A width of auto here collapses the board to nothing in webkit.) */
  #hyd-flyovers .hfu-board-wrap {
    grid-area: board;
    align-self: stretch;
    min-height: 0;
    margin: 6px calc(-1 * var(--hfu-pad)) 0;
    border: 0;
    background: none;
    box-shadow: none;
  }
  #hyd-flyovers .hyd-flyovers-board {
    height: 100%;
  }
  /* the newest line alone, in a white box, cut short with … where it is long; the ▾ at its right end opens the
     history (the latest lines in full) */
  #hyd-flyovers .hfu-side .hfu-said {
    grid-area: said;
    min-height: 0;
    overflow: hidden;
    margin: 8px;
    padding: 6px 40px 6px 8px;
    background: #fff;
    box-shadow:
      inset -1px -1px #fff,
      inset 1px 1px #808080,
      inset -2px -2px #dfdfdf,
      inset 2px 2px #0a0a0a;
    color: #000;
    font: 14px/1.3 var(--hfu-px);
  }
  #hyd-flyovers .hfu-side .hfu-said > li {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #hyd-flyovers .hfu-side .hfu-said > li + li {
    display: none;
  }
  /* before a game (behind the players or online sheets) there are no lines: the box keeps its room but isn’t drawn,
     so the panel’s grey shows there, not an empty white box */
  #hyd-flyovers .hfu-side .hfu-said:empty {
    visibility: hidden;
  }
  /* the ▾: a 24 px face inside the box’s right end, in a 44 px target (the rest of it a transparent border) */
  #hyd-flyovers .hfu-side .hfu-said-more {
    z-index: 1;
    grid-area: said;
    justify-self: end;
    align-self: center;
    width: 44px;
    height: 44px;
    margin-right: 1px;
    padding: 0;
    border: 10px solid transparent;
    background-clip: padding-box;
    font: 12px/1 Arial, sans-serif;
  }
  #hyd-flyovers .hfu-watch {
    grid-area: watch;
    margin: 0 8px 8px;
  }
  /* the road-move note, cut to two lines (see the phones’ shared rules at the end) */
  #hyd-flyovers [data-flyovers-moved] {
    grid-area: moved;
    margin: 14px 8px 8px;
    padding: 10px 8px 6px;
  }
  /* a laptop’s, not a phone’s: the closures are drawn on the board */
  #hyd-flyovers .hfu-closures {
    display: none;
  }
  /* the key in two columns, its rows spread evenly down the height left over, so no wide empty band remains; out of
     sight unless all of it fits there (the window marks it data-fits). Its box is the row, so the window can tell. */
  #hyd-flyovers .hfu-key {
    grid-area: key;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: space-evenly;
    gap: 3px 12px;
    min-height: 0;
    margin: 0;
    padding: 0 10px;
    overflow: hidden;
    font: 12px/1.25 var(--hfu-px);
  }
  #hyd-flyovers .hfu-key:not([data-fits]) {
    visibility: hidden;
  }
  /* where the full key doesn’t fit, its one row in the same place: the six swatches with a word each, spread across
     the width, in the middle of the height left over; out of sight unless all of it fits there (data-fits). Its box is
     the row’s own height, or the height left when that is less (the rest then runs past its foot, so the window can
     tell) */
  #hyd-flyovers .hfu-keyline {
    grid-area: key;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0 8px;
    max-height: 100%;
    margin: 0;
    padding: 0 10px;
    overflow: hidden;
    list-style: none;
    font: 12px/1.25 var(--hfu-px);
    white-space: nowrap;
  }
  #hyd-flyovers .hfu-keyline li {
    display: flex;
    flex: none;
    align-items: center;
    gap: 5px;
  }
  #hyd-flyovers .hfu-keyline i {
    width: 16px;
    height: 9px;
  }
  #hyd-flyovers .hfu-keyline .hfu-k-signal {
    width: 7px;
    height: 12px;
    margin: 0 2px;
  }
  #hyd-flyovers .hfu-keyline .hfu-k-player {
    width: 11px;
    height: 11px;
    margin: 0;
    border-width: 2px;
  }
  #hyd-flyovers .hfu-keyline:not([data-fits]) {
    visibility: hidden;
  }
  /* the bar at the foot: the die, the go’s sixes, and the roll as wide as is left (the orr choice in its place) */
  #hyd-flyovers .hfu-die {
    z-index: 1;
    grid-area: die;
    align-self: center;
    margin: 14px 8px 8px 2px;
  }
  #hyd-flyovers .hfu-sixes {
    position: relative;
    top: auto;
    left: auto;
    z-index: 1;
    grid-area: sixes;
    align-self: center;
    margin: 14px 8px 8px 0;
  }
  #hyd-flyovers .hfu-side .hfu-roll {
    z-index: 1;
    grid-area: roll;
    align-self: center;
    min-height: 52px;
    margin: 14px 0 8px;
  }
  #hyd-flyovers [data-flyovers-orr] {
    z-index: 1;
    grid-area: roll;
    align-self: center;
    margin: 22px 0 8px;
  }
  #hyd-flyovers .hfu-hint {
    display: none;
  }
  #hyd-flyovers .hfu-sheet {
    top: 100px;
    max-height: calc(100% - 112px);
  }
}

/* A touch screen wider than a phone (a tablet): its title bar and menu are 32 px taller with 44 px targets, so
   the board’s side is that much less than the screen’s height allows. */
@media (pointer: coarse) and (min-width: 621px) {
  #hyd-flyovers {
    width: min(calc(100% - 24px), calc(var(--hfu-vh) + 91px));
  }
}

/* A screen wider than a phone held upright (a tablet, a narrow window) has height to spare below the board: the
   window is as wide as the screen allows, not as tall, so the panel takes the height its content needs (the board
   stays square beside it) instead of scrolling in the board’s height. */
@media (orientation: portrait) and (min-width: 621px) and (min-height: 700px) {
  #hyd-flyovers .hfu-side {
    contain: none;
    overflow: visible;
  }
}

/* A phone held sideways: the laptop’s arrangement, the board on the left as tall as the screen allows. The menu
   moves over the panel, beside the board, so the board keeps the height the menu would have taken; the wide
   panel has the players and the closures beside the die, the roll and the latest lines, and the key under both. */
@media (pointer: coarse) and (min-width: 621px) and (max-height: 450px) {
  /* as tall as the screen a person can see allows (the window sets --hfu-visible, as on a phone held upright) */
  #hyd-flyovers {
    width: calc(100% - 12px);
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
    max-height: calc(var(--hfu-visible, 100dvh) - 12px);
  }
  /* the lobby’s code beside its qr code in a half-width column: smaller and tighter, so no letter goes under the qr */
  #hyd-flyovers .hfu-sheet .hfu-code {
    font-size: 28px;
    letter-spacing: 0.2em;
  }
  #hyd-flyovers[open] {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas:
      'title title'
      'board menu'
      'board side';
  }
  #hyd-flyovers .hfu-titlebar {
    grid-area: title;
  }
  #hyd-flyovers .hfu-menubar {
    grid-area: menu;
    min-height: 0;
    padding: 6px 6px 3px 0;
    border-bottom: 0;
    box-shadow: none;
    background: none;
  }
  #hyd-flyovers .hfu-body {
    display: contents;
  }
  /* the board’s side: the screen’s height less the margins, the frame, the slim title bar, the board’s own
     margin and border (66 px) */
  #hyd-flyovers .hfu-board-wrap {
    grid-area: board;
    width: calc(100vh - 66px);
    width: calc(var(--hfu-vh) - 66px);
    width: calc(var(--hfu-visible, var(--hfu-vh)) - 66px);
    margin: 6px;
  }
  #hyd-flyovers .hfu-side {
    grid-area: side;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    /* the columns take what they hold (the latest lines too), and the key only the height they leave, so the two never
       overlap: whole or not at all (see the next block) */
    grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas:
      'seats controls'
      'closures controls'
      'key key';
    gap: 8px 12px;
    margin: 3px 6px 6px 0;
    padding: 8px;
  }
  #hyd-flyovers .hfu-seats {
    grid-area: seats;
    align-self: start;
  }
  #hyd-flyovers .hfu-closures {
    grid-area: closures;
    align-self: start;
  }
  #hyd-flyovers .hfu-controls {
    grid-area: controls;
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-content: start;
    gap: 8px 0; /* the die and the sixes space themselves (margins), so a hidden sixes’ column costs nothing */
  }
  #hyd-flyovers .hfu-controls > * {
    grid-column: 1 / -1;
  }
  #hyd-flyovers .hfu-controls > .hfu-die {
    grid-column: 1;
    margin: 0 10px 0 0;
  }
  /* the go’s sixes between the die and the roll */
  #hyd-flyovers .hfu-controls > .hfu-sixes {
    position: static;
    grid-row: 1;
    grid-column: 2;
    align-self: center;
    margin: 0 10px 0 0;
  }
  #hyd-flyovers .hfu-controls > .hfu-roll,
  #hyd-flyovers .hfu-controls > [data-flyovers-orr] {
    grid-row: 1;
    grid-column: 3;
    align-self: center;
  }
  #hyd-flyovers .hfu-controls > .hfu-roll {
    min-height: 48px;
  }
  #hyd-flyovers .hfu-controls > [data-flyovers-orr] {
    margin-top: 8px;
  }
  #hyd-flyovers .hfu-seats li {
    padding: 2px 4px;
  }
  /* the key in two columns under both, at the panel’s foot: its box is what it holds, or the height left when that is
     less (what doesn’t fit then runs past its foot, so the window can tell) */
  #hyd-flyovers .hfu-key {
    grid-area: key;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-self: end;
    gap: 4px 12px;
    max-height: 100%;
    margin: 0;
    overflow: hidden;
  }
  #hyd-flyovers .hfu-hint {
    display: none;
  }
  #hyd-flyovers .hfu-sheet {
    top: 56px;
    max-height: calc(100% - 68px);
    overscroll-behavior: contain;
  }
  /* the join and play online sheets are narrow, clear of the title bar’s discs: they start right under it, so
     their buttons keep their full height in the short screen */
  #hyd-flyovers .hfu-sheet.hfu-online {
    top: 38px;
    max-height: calc(100% - 42px);
  }
  /* a sheet covers part of the menu row: the row’s buttons stop taking taps while one is up (the sheets’ own
     buttons are the way back) */
  #hyd-flyovers:has(.hfu-sheet:not([hidden])) .hfu-menubar {
    pointer-events: none;
  }
}

/* A phone held sideways: the room’s lobby in two columns, the code, qr code and share beside the seats and the
   buttons, so start and leave stay in sight on the short screen (the empty seats’ waiting… rows go). */
@media (pointer: coarse) and (min-width: 621px) and (max-height: 450px) {
  #hyd-flyovers .hfu-lobby {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
    gap: 0 16px;
    width: min(760px, calc(100% - 24px));
  }
  #hyd-flyovers .hfu-lobby h3 {
    grid-column: 1 / -1;
  }
  #hyd-flyovers .hfu-lobby .hfu-roomseats {
    margin-top: 0;
  }
  #hyd-flyovers .hfu-roomseats li:has(.hfu-empty) {
    display: none;
  }
}

/* A phone held sideways, the key under both columns or (a small phone) under the players: when the columns leave too
   little height for all of it (six players, a closure, the orr choice and a road move at once), none of it shows (the
   window marks it data-fits). */
@media (pointer: coarse) and (min-width: 621px) and (max-height: 450px) {
  #hyd-flyovers .hfu-key:not([data-fits]) {
    visibility: hidden;
  }
}

/* A small phone held sideways: the panel is too narrow for the key under both columns or the orr choice beside
   the die, so the key goes under the players and the choice under the die. */
@media (pointer: coarse) and (min-width: 621px) and (max-width: 760px) and (max-height: 450px) {
  #hyd-flyovers .hfu-side {
    grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas:
      'seats controls'
      'closures controls'
      'key controls';
  }
  #hyd-flyovers .hfu-key {
    grid-template-columns: minmax(0, 1fr);
    align-self: start;
    gap: 2px;
    max-height: 100%;
    overflow: auto;
    overscroll-behavior: contain;
    font-size: 11px;
  }
  #hyd-flyovers .hfu-controls > [data-flyovers-orr] {
    grid-row: auto;
    grid-column: 1 / -1;
  }
  /* the choice takes the die’s place (the die is blank while it is open), so the clock bar fits under it */
  #hyd-flyovers .hfu-controls:has([data-flyovers-orr]:not([hidden])) > .hfu-die {
    display: none;
  }
  /* and, as on a short phone held upright, its own words stand for the latest line while it is open (27 oct: six
     players, a closure and a road move with it ran the panel past the screen) */
  #hyd-flyovers .hfu-body:has([data-flyovers-orr]:not([hidden])) :is(.hfu-said, .hfu-said-more) {
    display: none;
  }
  /* five menu buttons don’t fit beside the board here: they take a second row, sharing each row’s width (the key,
     which how to play has too, scrolls in itself in the height left) */
  #hyd-flyovers .hfu-menubar {
    flex-wrap: wrap;
  }
  #hyd-flyovers .hfu-menubar button {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 8px;
  }
  #hyd-flyovers .hfu-menubar .hfu-help {
    margin-left: 0;
  }
}

/* A tall phone held upright has room to spare: a roomier strip with larger pieces, a larger key, die and roll. */
@media (max-width: 620px) and (min-height: 780px) {
  #hyd-flyovers .hfu-seats {
    font-size: 15px;
  }
  #hyd-flyovers .hfu-seats li {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  #hyd-flyovers .hfu-mini {
    width: 26px;
    height: 22px;
  }
  #hyd-flyovers .hfu-key {
    font-size: 13px;
  }
  #hyd-flyovers .hfu-side .hfu-said {
    font-size: 15px;
  }
  #hyd-flyovers .hfu-die {
    zoom: 1.15;
  }
  #hyd-flyovers .hfu-side .hfu-roll {
    min-height: 60px;
    font-size: 15px;
  }
}

/* The tallest phones: the die and the roll as tall as each other. */
@media (max-width: 620px) and (min-height: 860px) {
  #hyd-flyovers .hfu-die {
    zoom: 1.3;
  }
  #hyd-flyovers .hfu-side .hfu-roll {
    min-height: 68px;
    font-size: 16px;
  }
}

/* A short phone held upright: a tighter strip and latest line, and no full key, so the board gives way less (the key’s
   one row may show in the height left over above the bar). While an orr choice is open its own words stand for the
   latest line. */
@media (max-width: 620px) and (max-height: 700px) {
  #hyd-flyovers .hfu-seats li {
    padding-top: 2px;
    padding-bottom: 2px;
  }
  #hyd-flyovers .hfu-key {
    display: none;
  }
  #hyd-flyovers .hfu-body {
    padding-top: 4px;
  }
  #hyd-flyovers .hfu-board-wrap {
    margin-top: 4px;
  }
  #hyd-flyovers .hfu-side .hfu-said {
    margin: 6px 8px;
    padding-top: 4px;
    padding-bottom: 4px;
    font-size: 13px;
  }
  #hyd-flyovers .hfu-body:has([data-flyovers-orr]:not([hidden])) :is(.hfu-said, .hfu-said-more),
  #hyd-flyovers .hfu-body:has([data-flyovers-orr]:not([hidden]))::before {
    display: none;
  }
  #hyd-flyovers .hfu-side [data-flyovers-orr] {
    margin: 16px 0 6px;
    padding: 11px 6px 6px;
  }
  #hyd-flyovers [data-flyovers-orr] p {
    font-size: 12px;
    line-height: 1.25;
  }
  #hyd-flyovers [data-flyovers-orr] .hfu-pair {
    margin-top: 6px;
  }
}

/* The control group also contains the site’s zoom disc; both sides reserve the same grid track. */
@media (pointer: coarse), (max-width: 620px) {
  #hyd-flyovers .hfu-window-controls button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }
  #hyd-flyovers .hfu-titlebar h2 {
    max-width: max(40px, calc(100vw - 306px));
    font-size: 10px;
    overflow-wrap: anywhere;
  }
}

/* Below the site’s zoom breakpoint only two discs remain: 2 × (44 + 44 + 4 + 9) = 202px,
   with eight extra pixels of title clearance. Keep the side tracks balanced. */
@media (max-width: 900px) {
  #hyd-flyovers .hfu-titlebar h2 {
    max-width: calc(100vw - 210px);
  }
}
@media (max-width: 620px) {
  #hyd-flyovers .hfu-title-owner {
    display: none;
  }
}

/* --- A phone held either way: a slim title bar and menu (the owner, 21 oct: the buttons were too big and the
   title too small). The bar is 36 px: each disc is drawn at 24 px, centred on the bar, in a 44 × 44 target that
   runs from the bar’s top 8 px down past it (the rest of the target is a transparent border, so a tap anywhere in
   it reaches the button, and the bar is drawn over the menu row there); the title, a step larger, is centred on
   the discs’ line. The menu’s buttons are the same: 36 px faces in 44 px targets (1 px of target above the face and
   7 px below, so the face sits in the middle of the slim row), their words a step larger. --- */
@media (max-width: 620px), (pointer: coarse) and (max-height: 450px) {
  #hyd-flyovers .hfu-titlebar {
    position: relative;
    z-index: 1;
    min-height: 36px;
    padding: 0 4px;
  }
  #hyd-flyovers .hfu-window-controls {
    gap: 0;
    margin: 0 0 -8px;
  }
  #hyd-flyovers .hfu-window-controls button {
    border-width: 6px 10px 14px;
    border-color: transparent;
    border-radius: 22px / 18px 18px 26px 26px;
    background-clip: padding-box;
    box-shadow:
      inset 0 0 0 1px #aa514a,
      inset 0 2px #ffece7;
    font-size: 15px;
  }
  #hyd-flyovers .hfu-window-controls .hfu-minimise {
    border-color: transparent;
    background-clip: padding-box;
    box-shadow:
      inset 0 0 0 1px #a17a2b,
      inset 0 2px #fff3c0;
  }
  #hyd-flyovers .hfu-titlebar h2 {
    font-size: 15px;
  }
  #hyd-flyovers .hfu-menubar button {
    border-width: 1px 0 7px;
    border-color: transparent;
    border-radius: 3px / 7px;
    background-clip: padding-box;
    box-shadow:
      inset 0 0 0 1px #77787c,
      inset 0 2px #fff,
      inset 2px 0 #eeefed,
      inset -2px 0 #babbb9;
    font-size: 13px;
  }
  #hyd-flyovers .hfu-menubar button:active {
    box-shadow:
      inset 0 0 0 1px #77787c,
      inset 0 1px 3px #4b46534d;
  }
}

/* --- A phone held either way: the road-move note in two lines at most, so the board (upright) or the panel beside it
   (sideways) keeps its room and nothing scrolls: the dashed lines on the board show what moved, and the latest lines
   have it whole; the every-30-goes line is how to play’s. --- */
@media (max-width: 620px), (pointer: coarse) and (min-width: 621px) and (max-height: 450px) {
  #hyd-flyovers [data-flyovers-moved-text] {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  #hyd-flyovers [data-flyovers-next] {
    display: none;
  }
}
/* Held upright, one line: what moved, cut with … where it is long (the dashed lines on the board show the change). */
@media (max-width: 620px) {
  #hyd-flyovers [data-flyovers-moved-text] {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #hyd-flyovers [data-flyovers-moved-text] .hfu-moved-more {
    display: none;
  }
}

/* --- A phone held upright and shorter than 680 px: no room for the menu’s row. Its four buttons fold into menu ▾ at
   the title bar’s right end (a face like the menu buttons’, in a 44 px target that runs 8 px past the bar, as the
   discs’ do), which opens them as a windows 95 menu under the bar: flat rows on the panel grey, navy under the finger.
   The window opens and closes the list (data-open); the sheets drop from under the title bar instead. --- */
#hyd-flyovers .hfu-menu-toggle {
  display: none;
}
@media (max-width: 620px) and (max-height: 679.98px) {
  #hyd-flyovers .hfu-titlebar > span {
    display: flex;
    justify-content: flex-end;
  }
  #hyd-flyovers .hfu-menu-toggle {
    display: block;
    height: 44px;
    min-height: 44px;
    margin: 0 0 -8px;
    padding: 0 10px;
    border-width: 4px 0 12px;
    border-color: transparent;
    border-radius: 3px / 7px;
    background-clip: padding-box;
    box-shadow:
      inset 0 0 0 1px #77787c,
      inset 0 2px #fff,
      inset 2px 0 #eeefed,
      inset -2px 0 #babbb9;
    font-size: 13px;
  }
  #hyd-flyovers .hfu-menu-toggle[aria-expanded='true'] {
    background: #b9bdc0;
    box-shadow:
      inset 0 0 0 1px #77787c,
      inset 0 1px 3px #4b46534d;
  }
  #hyd-flyovers .hfu-menubar:not([data-open]) {
    display: none;
  }
  /* under menu ▾’s target, so menu ▾ keeps all of it while the list is open */
  #hyd-flyovers .hfu-menubar[data-open] {
    position: absolute;
    top: 45px;
    right: 4px;
    z-index: 6;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 190px;
    padding: 3px;
    border: 0;
    overflow: visible;
    background: var(--hfu-grey);
    box-shadow:
      inset -1px -1px #0a0a0a,
      inset 1px 1px #dfdfdf,
      inset -2px -2px #808080,
      inset 2px 2px #fff,
      3px 3px 0 #0006;
  }
  #hyd-flyovers .hfu-menubar[data-open] button {
    flex: none;
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: #000;
    font: 14px var(--hfu-px);
    text-align: left;
    text-shadow: none;
  }
  #hyd-flyovers .hfu-menubar[data-open] button:is(:hover, :active, :focus-visible) {
    outline: 0;
    background: #000080;
    color: #fff;
  }
  /* a px below the discs’ 44 px targets, so a sheet never covers their foot */
  #hyd-flyovers .hfu-sheet {
    top: 45px;
    max-height: calc(100% - 53px);
  }
}

/* --- The moment (26 oct): a note over the board for a go sat out, a pass used, three sixes or a convoy’s hold, in a
   windows 95 tooltip’s pale yellow with a black line and a hard shadow, its first words in the board’s red. Taps go
   through it to the board. --- */
#hyd-flyovers [data-flyovers-note] {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  pointer-events: none;
}
#hyd-flyovers [data-flyovers-note] > p {
  display: grid;
  gap: 2px;
  max-width: 80%;
  margin: 0;
  padding: 8px 12px;
  border: 2px solid #1a1a1a;
  background: #ffffe1;
  box-shadow: 4px 4px 0 #0007;
  color: #1a1a1a;
  font: 14px/1.25 var(--hfu-px);
  text-align: center;
  text-transform: none;
  animation: hfu-pop 0.24s steps(3);
}
#hyd-flyovers [data-flyovers-note] b {
  color: #c6362f;
  font-weight: 400;
  font-size: 16px;
}

/* --- Pieces alive (26 oct): the piece whose go it is hops a pixel step every 0.7 s with its effect blinking beside
   it (the approved mockup’s), and what a card has just made blinks three times. Nothing moves with reduced motion or
   the site’s animations off: a note then just shows, for the same time. --- */
#hyd-flyovers .hfu-alive {
  animation: hfu-hop 0.7s steps(1) infinite;
}
#hyd-flyovers .hfu-fx {
  animation: hfu-flash 0.7s steps(1) infinite;
}
#hyd-flyovers .hfu-blink {
  animation: hfu-blink 0.3s steps(1) 3;
}
@keyframes hfu-hop {
  0% { transform: translate(0, 0); }
  50% { transform: translate(0, -2px); }
}
@keyframes hfu-flash {
  0% { opacity: 1; }
  50% { opacity: 0; }
}
@keyframes hfu-blink {
  0% { opacity: 0; }
  50% { opacity: 1; }
}
@keyframes hfu-pop {
  0% { transform: scale(0.7); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  #hyd-flyovers .hfu-alive,
  #hyd-flyovers .hfu-fx,
  #hyd-flyovers .hfu-blink,
  #hyd-flyovers [data-flyovers-note] > p {
    animation: none;
  }
}
body.motion-off #hyd-flyovers .hfu-alive,
body.motion-off #hyd-flyovers .hfu-fx,
body.motion-off #hyd-flyovers .hfu-blink,
body.motion-off #hyd-flyovers [data-flyovers-note] > p {
  animation: none;
}

/* --- Pieces and colours (26 oct): the players sheet’s piece button on each row, and the box under the list that dresses
   the row picked (the approved mock’s phone 3); online, your piece under your own seat in the lobby and on the end
   ticket. A windows 95 group box: the ten colours as flat swatches with a black line (a taken one greyed and struck
   through), the pieces as buttons, the one worn pressed in, a taken one greyed with its owner’s name under it. --- */
#hyd-flyovers .hfu-look {
  width: 34px;
  height: 30px;
  min-width: 0;
  min-height: 0;
  padding: 1px;
}
#hyd-flyovers .hfu-look[aria-pressed='true'] {
  background: #000080;
  box-shadow:
    inset 1px 1px #0a0a0a,
    inset -1px -1px #fff;
}
#hyd-flyovers .hfu-look .hfu-mini {
  width: 100%;
  height: 100%;
}
#hyd-flyovers .hfu-picker {
  min-width: 0;
  margin: 0 0 8px;
  padding: 4px 8px 8px;
  border: 1px solid #808080;
  box-shadow:
    1px 1px #fff,
    inset 1px 1px #fff;
}
#hyd-flyovers .hfu-picker legend {
  padding: 0 4px;
}
#hyd-flyovers .hfu-picker p {
  margin: 0;
  color: #5a5b62;
  font-size: 11px;
}
#hyd-flyovers .hfu-swatches {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  margin: 2px 0 6px;
}
#hyd-flyovers .hfu-swatch {
  position: relative;
  width: auto;
  min-width: 0;
  height: 26px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #000;
  border-radius: 0;
  background: var(--hfu-swatch);
  box-shadow:
    inset -1px -1px #0005,
    inset 1px 1px #fff8;
}
#hyd-flyovers .hfu-swatch:active {
  background: var(--hfu-swatch);
}
#hyd-flyovers .hfu-swatch[aria-checked='true'] {
  outline: 2px solid #000;
  outline-offset: 1px;
  box-shadow: inset 0 0 0 2px #fff;
}
/* a colour someone else has: greyed, and struck through corner to corner */
#hyd-flyovers .hfu-swatch:disabled {
  opacity: 1;
  filter: saturate(0.25) brightness(1.1);
}
#hyd-flyovers .hfu-swatch:disabled::after {
  content: '';
  position: absolute;
  top: 50%;
  left: -20%;
  width: 140%;
  height: 3px;
  margin-top: -1.5px;
  background: #000;
  transform: rotate(-35deg);
}
/* and who has it, on a pale strip across its foot over the strike, as a taken piece shows its owner */
#hyd-flyovers .hfu-swatch small {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  overflow: hidden;
  padding: 1px 2px;
  background: #ececec;
  border-top: 1px solid #000;
  color: #000;
  font: 9px/1 var(--hfu-px);
  text-overflow: ellipsis;
  white-space: nowrap;
}
#hyd-flyovers .hfu-pieces {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}
#hyd-flyovers .hfu-piece {
  position: relative;
  width: auto;
  min-width: 0;
  height: 40px;
  min-height: 0;
  padding: 1px;
}
#hyd-flyovers .hfu-piece .hfu-mini {
  width: 34px;
  height: 30px;
  margin: 0 auto;
}
#hyd-flyovers .hfu-piece[aria-pressed='true'] {
  background: #fff;
  box-shadow:
    inset 1px 1px #0a0a0a,
    inset -1px -1px #fff,
    inset 2px 2px #808080;
}
#hyd-flyovers .hfu-piece:disabled {
  opacity: 1;
  background: #d4d4d4;
}
#hyd-flyovers .hfu-piece:disabled .hfu-mini {
  opacity: 0.45;
}
#hyd-flyovers .hfu-piece small {
  position: absolute;
  right: 2px;
  bottom: 2px;
  left: 2px;
  overflow: hidden;
  color: #333;
  font: 9px/1 var(--hfu-px);
  text-overflow: ellipsis;
  white-space: nowrap;
}
#hyd-flyovers .hfu-picker-close {
  display: block;
  margin: 8px 0 0 auto;
}
/* the lobby: every seat’s piece in a cell of one width (yours is the button that opens your piece), so the names line
   up; your piece’s box under your seat, across the row */
#hyd-flyovers .hfu-seat-piece {
  display: grid;
  place-items: center;
  width: 28px;
  height: 22px;
  min-width: 0;
  min-height: 0;
  padding: 0;
}
#hyd-flyovers .hfu-roomseats .hfu-picker {
  grid-column: 1 / -1;
  margin: 2px 0 4px;
  font: 12px/1.35 var(--desktop-font, 'Lucida Grande', Tahoma, sans-serif);
}
/* the end ticket online: your piece under again and leave room, its box under them */
#hyd-flyovers .hfu-end-look {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
#hyd-flyovers .hfu-end .hfu-picker {
  margin: 8px 0 0;
}
/* touch screens: every swatch, piece and piece button a 44 px target; the colours in two rows of five */
@media (pointer: coarse), (max-width: 620px) {
  #hyd-flyovers .hfu-look {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }
  #hyd-flyovers .hfu-swatches {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  #hyd-flyovers .hfu-swatch,
  #hyd-flyovers .hfu-piece {
    height: 44px;
    min-height: 44px;
  }
  #hyd-flyovers .hfu-seat-piece {
    width: 44px;
  }
  #hyd-flyovers button.hfu-seat-piece {
    height: 44px;
    min-height: 44px;
  }
}
