/* Brighter Merchant (/merchant, src/merchant/Merchant.tsx and parts.tsx): the board's clock along the top, the
   bounties and the route in a panel, the run drawn on the map beside it. A phone shows one of the three at a time,
   by the tabs along its foot. */
.mx {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: var(--mx-panel, 28rem) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--bg1);
  color: var(--fg0);
  /* (a tool, not a document: a tap is a tap at once, never the start of a zoom or of a selection) */
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  /* (the site's own accent, as Data's and Fashion's: the stall's red and white are kept for the tool's mark and a
     few touches) */
  --mx: var(--accent);
  --mx-take: #6fd08c;
  --mx-buy: #6fd08c;
  --mx-sell: #ff7b72;
  --mx-route: #ffd166;
  --mx-teleport: var(--merchant-white);
  --mx-shortcut: #7fd6e8;
}
.mx-loading {
  background: var(--bg0);
}
.mx-fail {
  grid-column: 1 / -1;
  margin: auto;
  padding: 2rem;
  color: var(--fg1);
  text-align: center;
  max-width: 28rem;
}
.mx-hidden,
.mx [hidden] {
  display: none !important;
}
.mx button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.mx input {
  -webkit-user-select: text;
  user-select: text;
}
/* (what is inside a button is the button: a finger on its picture or its words presses it) */
.mx button:not(.mx-mark) > * {
  pointer-events: none;
}
.mx-ui {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
  flex: none;
}

/* ---- the top: the board's clock, and the buttons */
.mx-head {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-width: 0;
}
.mx-clock {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}
.mx-clock svg {
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
  transform: rotate(-90deg);
}
.mx-clock circle {
  fill: none;
  stroke-width: 4;
}
.mx-clock-track {
  stroke: var(--bg3);
}
.mx-clock-fill {
  stroke: var(--mx);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.25s linear;
}
.mx-clock-soon .mx-clock-fill {
  stroke: var(--warn);
}
.mx-clock-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.mx-clock-label {
  font-size: 0.6875rem;
  color: var(--fg2);
  white-space: nowrap;
}
.mx-clock-time {
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.mx-clock-soon .mx-clock-time {
  color: var(--warn);
}
/* (the clock keeps to its size) */
.mx-head .mx-clock {
  flex: none;
}
/* (a narrow phone: the bar's room shared out so Settings still fits) */
@media (max-width: 400px) {
  .mx-head {
    gap: 0.25rem;
    padding: 0.5rem;
  }
  .mx-head-buttons {
    gap: 0.25rem;
  }
  .mx-head .mx-tool {
    width: 2rem;
    height: 2rem;
  }
}
.mx-head-buttons {
  display: flex;
  gap: 0.375rem;
  flex: none;
}
.mx-grow {
  flex: 1;
}
/* the tool buttons, as Fashion's toolbar draws them: square, bordered, a line icon, the name under on hover */
.mx-tool {
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  justify-content: center;
  border-radius: 0.625rem;
}
.mx-tool:disabled {
  opacity: 0.5;
  cursor: default;
}
.mx-tool svg.ic {
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mx-tip {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.5rem);
  right: 0;
  width: max-content;
  max-width: 15rem;
  padding: 0.375rem 0.5625rem;
  border-radius: 0.4375rem;
  background: #f2f5f9;
  color: #11141a;
  font-size: 0.75rem;
  line-height: 1.35;
  font-weight: 400;
  text-align: left;
  white-space: normal;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-0.25rem);
  transition:
    opacity 0.12s,
    transform 0.12s;
}
.mx-tip b {
  display: block;
  font-weight: 700;
  font-size: 0.8125rem;
}
.mx-tip kbd {
  font: 600 0.625rem/1 var(--sans);
  background: #dde3ea;
  color: #3a4250;
  border-radius: 0.1875rem;
  padding: 0.125rem 0.25rem;
  margin-left: 0.375rem;
  vertical-align: 0.0625rem;
}
.mx-tool:is(:hover, :focus-visible) > .mx-tip {
  opacity: 1;
  transform: none;
  transition-delay: 0.3s;
}
@media (hover: none) {
  .mx-tip {
    display: none;
  }
}

/* ---- the panel */
.mx-body {
  grid-column: 1;
  grid-row: 2;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.25rem 0.75rem 1rem;
  border-right: 1px solid var(--line);
}
.mx-sec {
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
}
.mx-sec-folded {
  padding-bottom: 0;
}
.mx-sec-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
/* a list's heading is its button: the chevron points down when it is open */
.mx-fold {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border: 0;
  background: none;
  color: var(--fg0);
  text-align: left;
  cursor: pointer;
}
.mx-fold svg {
  flex: none;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: var(--fg2);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.12s;
}
.mx-fold[aria-expanded='true'] svg {
  transform: rotate(90deg);
}
.mx-fold h2 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
}
.mx-fold .mx-count {
  margin-left: auto;
}
.mx-fold:hover svg {
  stroke: var(--fg0);
}
.mx-count {
  font-size: 0.75rem;
  color: var(--fg2);
}
.mx-link {
  padding: 0.25rem 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 0.8125rem;
  cursor: pointer;
}
.mx-link:hover {
  text-decoration: underline;
}
.mx-note {
  margin: 0 0 0.5rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.5rem;
  background: rgba(232, 180, 90, 0.12);
  color: var(--warn);
  font-size: 0.8125rem;
  line-height: 1.4;
}
.mx-away {
  background: var(--bg2);
  color: var(--fg1);
}
.mx-none {
  margin: 0;
  color: var(--fg2);
  font-size: 0.875rem;
  line-height: 1.5;
}
.mx-empty {
  margin-top: 1.25rem;
  padding: 1rem;
  border: 1px dashed var(--line);
  border-radius: 0.625rem;
  text-align: center;
}
/* the bounties: a tile each */
.mx-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}
.mx-slot {
  position: relative;
  min-height: 6.5rem;
  border-radius: 0.625rem;
  border: 1.5px solid var(--line);
  background: var(--bg2);
  color: var(--fg0);
  text-align: center;
  display: flex;
  flex-direction: column;
}
/* (a bounty is one button over all of its tile: its picture, its name, and the word of what a tap does) */
.mx-slot-main {
  flex: 1;
  width: 100%;
  min-height: 0;
  /* (room above the picture for the word of what a tap does: it never covers the picture, and nothing moves when
     it shows) */
  padding: 1.375rem 0.25rem 0.5rem;
  border: 0;
  border-radius: inherit;
  background: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3125rem;
  cursor: pointer;
}
.mx-slot-main:disabled {
  cursor: default;
}
.mx-slot-name {
  max-width: 100%;
  font-size: 0.75rem;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mx-goods {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
  flex: none;
}
.mx-goods-none {
  display: grid;
  place-items: center;
  border-radius: 0.375rem;
  background: var(--bg3);
  color: var(--fg2);
  font-size: 0.75rem;
  text-transform: uppercase;
}
.mx-goods.mx-small {
  width: 1.25rem;
  height: 1.25rem;
}
.mx-goods.mx-mid {
  width: 1.75rem;
  height: 1.75rem;
}
.mx-goods.mx-large {
  width: 3rem;
  height: 3rem;
}
/* the word over a bounty: what a tap on it does, or what the page says to do with it */
.mx-over {
  position: absolute;
  left: 0;
  right: 0;
  top: 0.3125rem;
  font-size: 0.6875rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: none;
}
.mx-offer .mx-over {
  color: var(--mx-take);
}
.mx-mine .mx-over {
  color: var(--mx-sell);
}
/* what the page says: these to pick up and these to drop, marked as a pointer over them marks them; the rest of a
   board faint */
.mx-take {
  border-color: var(--mx-take);
  background: rgba(111, 208, 140, 0.1);
}
.mx-drop {
  border-color: var(--mx-sell);
  background: rgba(255, 123, 114, 0.1);
}
.mx-take .mx-over,
.mx-drop .mx-over {
  display: block;
}
.mx-leave .mx-slot-main {
  opacity: 0.5;
}
@media (hover: hover) {
  .mx-offer:has(.mx-slot-main:hover:not(:disabled)) {
    border-color: var(--mx-take);
    background: rgba(111, 208, 140, 0.14);
  }
  .mx-mine:has(.mx-slot-main:hover) {
    border-color: var(--mx-sell);
    background: rgba(255, 123, 114, 0.14);
  }
  .mx-slot-main:hover:not(:disabled) .mx-over {
    display: block;
  }
  .mx-leave .mx-slot-main:hover:not(:disabled) {
    opacity: 1;
  }
  /* (an offer's way off the list shows with the pointer) */
  .mx-offer .mx-x {
    opacity: 0;
  }
  .mx-offer:hover .mx-x,
  .mx-offer .mx-x:focus-visible {
    opacity: 1;
  }
}
/* whether a bounty's goods are bought: the foot of its tile, a button of its own */
.mx-state {
  flex: none;
  width: 100%;
  padding: 0.3125rem 0.25rem;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0 0 0.5rem 0.5rem;
  background: none;
  color: var(--fg2);
  font-size: 0.6875rem;
  cursor: pointer;
}
.mx-bought .mx-state {
  color: var(--fg0);
}
@media (hover: hover) {
  .mx-state:hover {
    background: var(--bg3);
    color: var(--fg0);
  }
}
.mx-x {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  z-index: 1;
  width: 1.625rem;
  height: 1.625rem;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg3);
  color: var(--fg1);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.mx-x:hover {
  color: #fff;
  background: var(--bad);
}
.mx-slot-empty {
  align-items: center;
  justify-content: center;
  border-style: dashed;
  background: none;
  color: var(--fg2);
  cursor: pointer;
}
.mx-slot-target {
  border-color: var(--mx);
  color: var(--mx);
}
.mx-plus {
  font-size: 1.5rem;
  line-height: 1;
}
/* (phones: what the plan takes, and the way to its route) */
.mx-cta {
  display: none;
}

/* ---- the goods to add from */
.mx-picker {
  margin-top: 0.75rem;
  padding: 0.625rem;
  border-radius: 0.625rem;
  border: 1px solid var(--line);
  background: var(--bg0);
}
/* (beside the map it leads the panel, its goods in a window of one height: nothing under it moves as they are
   typed for) */
.mx-body > .mx-picker:first-child {
  margin: 0.5rem 0 0.75rem;
}
.mx-picker:not(.mx-picker-sheet) #merchant-goods {
  height: min(19rem, 36vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  align-content: start;
  padding-right: 0.125rem;
}
.mx-picker-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.mx-picker-head strong {
  flex: 1;
  font-size: 0.875rem;
}
/* (which board's offers are being added) */
.mx-seg {
  flex: 1;
  display: flex;
  gap: 0.25rem;
}
.mx-seg button {
  padding: 0.375rem 0.625rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  background: none;
  color: var(--fg2);
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}
.mx-seg button[aria-pressed='true'] {
  border-color: var(--mx);
  color: var(--fg0);
}
.mx-entry {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.mx-picker input[type='search'] {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.5rem 0.625rem;
  border-radius: 0.5rem;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--fg0);
  font: inherit;
  font-size: 0.875rem;
}
.mx-picker input[type='search']:focus {
  outline: 2px solid var(--mx);
  outline-offset: -1px;
}
/* (how the search is used, under it) */
.mx-entry-hint {
  margin: 0.375rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.3125rem;
  font-size: 0.6875rem;
  line-height: 1.5;
  color: var(--fg2, var(--fg1));
}
.mx-entry-hint kbd:not(:first-child) {
  margin-left: 0.375rem;
}
.mx-entry-hint kbd + kbd {
  margin-left: 0;
}
.mx-entry-hint kbd,
.mx-code {
  padding: 0.0625rem 0.25rem;
  border-radius: 0.25rem;
  border: 1px solid var(--line);
  background: var(--bg3);
  color: var(--fg1);
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.15;
}
/* what was typed, found: one to a row, the one Enter adds marked */
.mx-hits {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
}
.mx-hit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: 'pic name code' 'pic way code';
  align-items: center;
  column-gap: 0.5rem;
  padding: 0.3125rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  background: var(--bg2);
  color: var(--fg1);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.mx-hit .mx-goods {
  grid-area: pic;
}
.mx-hit-name {
  grid-area: name;
  font-size: 0.875rem;
  color: var(--fg0);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mx-hit-way {
  grid-area: way;
  font-size: 0.6875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mx-hit .mx-code {
  grid-area: code;
  font-size: 0.75rem;
}
.mx-hit[aria-selected='true'] {
  border-color: var(--mx);
  background: var(--bg3);
}
.mx-hit:hover:not(:disabled) {
  border-color: var(--fg2);
}
.mx-hit:disabled {
  opacity: 0.4;
  cursor: default;
}
.mx-hits .mx-none {
  padding: 0.75rem 0;
}
/* a bounty's two letters, over the corner of its picture */
.mx-key {
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  min-width: 1.125rem;
  padding: 0.0625rem 0.1875rem;
  box-sizing: border-box;
  border-radius: 0.25rem;
  border: 1px solid var(--line);
  background: var(--bg3);
  color: var(--fg1);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: slashed-zero;
  line-height: 1.15;
  text-align: center;
}
/* "Space", on the button it presses */
.mx-kbd {
  margin-left: 0.5rem;
  padding: 0.0625rem 0.3125rem;
  border-radius: 0.25rem;
  border: 1px solid currentColor;
  background: none;
  color: inherit;
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.3;
  opacity: 0.7;
  vertical-align: 0.0625rem;
}
.mx-tick .mx-kbd {
  margin-left: 0.125rem;
}
.mx-grid {
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
  gap: 0.375rem;
}
.mx-tile {
  position: relative;
  min-height: 4.25rem;
  padding: 0.375rem 0.125rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1875rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  background: var(--bg2);
  color: var(--fg1);
  cursor: pointer;
  min-width: 0;
}
.mx-tile span:last-child {
  max-width: 100%;
  font-size: 0.6875rem;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mx-tile:hover:not(:disabled) {
  border-color: var(--mx);
  color: var(--fg0);
}
.mx-tile:active:not(:disabled) {
  background: var(--bg3);
}
.mx-tile:disabled {
  opacity: 0.4;
  cursor: default;
}
.mx-grid .mx-none {
  grid-column: 1 / -1;
  padding: 0.75rem 0;
}
.mx-picked {
  display: flex;
  gap: 0.375rem;
  min-height: 2.75rem;
  margin-bottom: 0.5rem;
  overflow-x: auto;
  align-items: center;
}
.mx-picked button {
  flex: none;
  padding: 0.1875rem;
  border-radius: 0.5rem;
  border: 1.5px solid var(--mx);
  background: var(--bg2);
  cursor: pointer;
}
.mx-picked-none {
  color: var(--fg2);
  font-size: 0.8125rem;
}

/* ---- the route */
.mx-route {
  margin-top: 1rem;
}
/* (in the side panel, before a run: what it takes and earns, and no more. Its steps are shown once it is started;
   the map has its line meanwhile) */
.mx-route-wait > :not(.mx-summary) {
  display: none;
}
.mx-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  margin-bottom: 0.625rem;
  font-size: 0.8125rem;
  color: var(--fg2);
}
.mx-summary .mx-link {
  margin-left: auto;
  font-weight: 700;
}
.mx-summary b {
  font-size: 1.0625rem;
  color: var(--fg0);
  font-variant-numeric: tabular-nums;
}
/* money as the game shows it: each figure followed by its coin */
.mx-money {
  white-space: nowrap;
}
.mx-coin {
  width: 0.95em;
  height: 0.95em;
  margin-left: 0.1em;
  vertical-align: -0.1em;
}
/* (the settings' choice of what the bounties are picked for) */
.mx-pick-for {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
}
.mx-pick-for .mx-unit {
  margin-left: 0;
}
/* what rewards are shown in: two small buttons, at the row's end */
.mx-unit {
  margin-left: auto;
  align-self: center;
  display: inline-flex;
  padding: 0.125rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.mx-unit button {
  padding: 0.125rem 0.5rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--fg2);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.mx-unit button:hover {
  color: var(--fg0);
}
.mx-unit button[aria-pressed='true'] {
  background: var(--mx);
  color: #fff;
}
.mx-primary,
.btn.mx-primary {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--accent);
  background: var(--accent-dim);
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
}
.btn.mx-primary:hover:not(:disabled) {
  background: var(--accent);
  color: #0d0f13;
}
.btn.mx-primary:disabled {
  opacity: 0.5;
}
/* what to do at the board before setting off */
.mx-first {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  background: var(--bg2);
}
.mx-first-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.mx-first .mx-acts {
  margin-bottom: 0.625rem;
}
.mx-first .mx-primary {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.75rem;
  font-size: 0.9375rem;
}
.mx-soon {
  margin: 0 0 0.5rem;
  color: var(--warn);
  font-size: 0.8125rem;
  line-height: 1.4;
}
.btn.mx-second {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.625rem;
  border-radius: 0.5rem;
  border: 1.5px solid var(--mx);
  background: none;
  color: var(--mx);
  font-weight: 700;
  font-size: 0.875rem;
}
.mx-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
/* how the player gets to a stop: a pill a leg between the stops, of another shade than the stops; a walk in words,
   a portal stone in the teleports' purple and a shortcut in the shortcuts' blue, each with its symbol */
.mx-legs {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3125rem;
  margin: 0.4375rem 0 0.4375rem 1.25rem;
}
.mx-leg {
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.3125rem 0.875rem 0.3125rem 0.4375rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 1.5rem;
  border: 1.5px dashed var(--line);
  background: var(--bg0);
  color: var(--fg1);
  font-size: 0.8125rem;
}
.mx-leg-teleport {
  border-style: solid;
  border-color: var(--mx-teleport);
  background: rgba(214, 206, 189, 0.08);
}
.mx-leg-shortcut {
  border-style: solid;
  border-color: var(--mx-shortcut);
  background: rgba(127, 214, 232, 0.12);
}
@media (hover: hover) {
  .mx-leg:hover {
    border-color: #fff;
    color: var(--fg0);
  }
}
.mx-leg-icons {
  flex: none;
  display: flex;
  gap: 0.125rem;
}
.mx-leg-icons img {
  width: 1.375rem;
  height: 1.375rem;
}
.mx-travel {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  margin: 0;
  font-size: 0.75rem;
  color: var(--fg2);
  white-space: nowrap;
}
.mx-leg .mx-travel {
  flex: none;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--fg0);
}
.mx-leg-walk {
  padding-left: 0.875rem;
}
.mx-travel b {
  color: var(--fg0);
  font-weight: 700;
}
.mx-leg-to {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mx-leg-to .mx-stop-name {
  font-size: inherit;
  font-weight: 600;
  line-height: inherit;
  color: var(--fg0);
}
.mx-stop {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem;
  border-radius: 0.75rem;
  border: 1.5px solid var(--line);
  background: var(--bg2);
}
.mx-num {
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mx-route);
  color: #1c1503;
  font-size: 0.875rem;
  font-weight: 800;
}
.mx-step-home .mx-num {
  background: var(--mx);
}
.mx-stop-body {
  flex: 1;
  min-width: 0;
}
.mx-stop-name {
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.75rem;
}
.mx-acts {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.mx-act {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
/* the word says it, and is the thing to read: Buy on green, Sell on red */
.mx-act-word {
  flex: none;
  min-width: 3.25rem;
  box-sizing: border-box;
  padding: 0.1875rem 0.4375rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
}
.mx-act-buy .mx-act-word {
  color: var(--mx-buy);
  background: rgba(111, 208, 140, 0.16);
}
.mx-act-sell .mx-act-word {
  color: var(--mx-sell);
  background: rgba(255, 123, 114, 0.16);
}
.mx-act-items {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
}
.mx-act-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.mx-act-take .mx-act-word {
  min-width: 4.5rem;
  color: var(--mx-take);
}
.mx-act-drop .mx-act-word {
  min-width: 4.5rem;
  color: var(--mx-sell);
}
.mx-act-ground .mx-act-word {
  min-width: 4.5rem;
  color: var(--warn);
}
.mx-act-name {
  font-size: 0.9375rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mx-tick {
  flex: none;
  align-self: center;
  height: 2.25rem;
  min-width: 2.25rem;
  padding: 0 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3125rem;
  border-radius: 1.25rem;
  border: 1.5px solid var(--line);
  background: none;
  color: var(--fg2);
  font-weight: 700;
  cursor: pointer;
}
.mx-tick svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mx-tick:hover:not(:disabled) {
  border-color: var(--mx);
  color: var(--mx);
}
.mx-tick:disabled {
  opacity: 0.35;
  cursor: default;
}
/* the stop to go to now: the one that stands out, larger than the rest, its Done a full button. It and the legs
   that lead to it are one box: each still its own part, pointed at on its own */
.mx-step-next {
  margin: 0.5rem 0;
  padding: 0.5rem;
  border: 2px solid var(--mx);
  border-radius: 0.875rem;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.mx-step-next .mx-legs {
  margin: 0 0 0.5rem 0.25rem;
}
.mx-step-next .mx-stop {
  padding: 0.75rem 0.75rem 0.75rem 0.625rem;
  background: var(--bg2);
}
.mx-step-next .mx-tick {
  align-self: flex-end;
}
@media (hover: hover) {
  .mx-stop:hover {
    border-color: #fff;
  }
}
.mx-step-next .mx-act-name {
  font-size: 1.0625rem;
  /* (its name whole, over two lines if it must: the one to read now) */
  white-space: normal;
  overflow: visible;
  line-height: 1.2;
}
.mx-step-next .mx-tick:not(:disabled) {
  height: 2.75rem;
  padding: 0 1.125rem 0 1rem;
  font-size: 0.9375rem;
  font-weight: 700;
}
.mx-step-next .mx-leg {
  font-size: 0.9375rem;
}
.mx-step-next .mx-num {
  background: var(--mx);
  color: #0d0f13;
}
.mx-step-next .mx-stop-name {
  font-size: 1.0625rem;
}
.mx-step-next .mx-tick:not(:disabled) {
  padding: 0 0.875rem 0 0.75rem;
  border-color: var(--accent);
  background: var(--accent-dim);
  color: #fff;
}
.mx-reset-note {
  font-size: 0.75rem;
  color: var(--fg2);
  line-height: 1.4;
}
/* (a run under way: the stops after the next one step back) */
.mx-step-later {
  opacity: 0.6;
}
.mx-step-later:hover,
.mx-step-later:focus-within {
  opacity: 1;
}
.mx-route[aria-busy='true'] .mx-steps {
  opacity: 0.6;
}

/* ---- the settings: a sheet over the panel */
.mx-sheet {
  grid-column: 1;
  /* (under the bar, whose Settings button shows it and puts it away) */
  grid-row: 2 / -1;
  z-index: 7;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg1);
  border-right: 1px solid var(--line);
}
/* (the bounties across the page: the settings come in from the right, a column wide, the desk still beside them) */
.mx-full > .mx-sheet {
  justify-self: end;
  width: min(30rem, 100%);
  border-right: none;
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.4);
}
.mx-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 0.875rem 1.5rem;
}
.mx-sheet h3,
.mx-more summary {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mx);
}
.mx-more summary {
  cursor: pointer;
  padding: 0.25rem 0;
}
.mx-more {
  border-top: 1px solid var(--line);
  margin-top: 1rem;
}
.mx-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.5rem;
  font-size: 0.875rem;
}
.mx-field-input {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.mx-field-input i {
  font-style: normal;
  color: var(--fg2);
  font-size: 0.75rem;
}
.mx-field input {
  width: 4.5rem;
  padding: 0.375rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--fg0);
  font: inherit;
  text-align: right;
}
.mx-switch {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.4375rem 0;
  font-size: 0.875rem;
  cursor: pointer;
}
.mx-switch input {
  flex: none;
  appearance: none;
  width: 2.5rem;
  height: 1.5rem;
  margin: 0;
  border-radius: 1rem;
  background: var(--bg3);
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
}
.mx-switch input::before {
  content: '';
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: var(--fg1);
  transition: transform 0.15s;
}
.mx-switch input:checked {
  background: var(--mx);
}
.mx-switch input:checked::before {
  transform: translateX(1rem);
  background: #0d0f13;
}
.mx-switch small {
  display: block;
  margin-top: 0.125rem;
  color: var(--fg2);
  font-size: 0.75rem;
  line-height: 1.35;
}
.mx-hint {
  margin: 0 0 0.375rem;
  color: var(--fg2);
  font-size: 0.75rem;
  line-height: 1.4;
}
.mx-shortcuts {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.mx-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0 0.625rem;
  border-radius: 0.5rem;
  border: 1px solid var(--line);
  background: var(--bg2);
  font-size: 0.875rem;
  cursor: pointer;
}
.mx-chip input {
  accent-color: var(--mx);
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
}
.mx-chip i {
  margin-left: auto;
  white-space: nowrap;
  font-style: normal;
  font-size: 0.75rem;
  color: var(--fg2);
}
.mx-chip-locked {
  opacity: 0.5;
  cursor: default;
}
.mx-defaults {
  margin-top: 1.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

/* ---- the map */
.mx-map {
  grid-column: 2;
  grid-row: 1 / 3;
  min-width: 0;
  min-height: 0;
  background: #0e1014;
}
.mx-map canvas {
  outline: none;
}
/* (the map sits back a little, so the run reads over it) */
.mx-map #merchant-canvas {
  filter: brightness(0.72) saturate(0.85);
}
.mx-map canvas.mx-overlay {
  pointer-events: none;
}
.mx-map-loading canvas {
  opacity: 0;
}
.mx-map canvas {
  transition: opacity 0.3s ease;
}
.mx-marks {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.mx-mark {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--fg0);
  pointer-events: auto;
  cursor: pointer;
  will-change: transform;
}
.mx-mark[hidden] {
  display: none;
}
.mx-pin {
  position: absolute;
  left: -0.3rem;
  top: -0.3rem;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: rgba(240, 244, 250, 0.9);
  border: 2px solid rgba(8, 10, 14, 0.85);
  box-sizing: border-box;
  font-size: 0.6875rem;
  font-weight: 750;
  line-height: 1;
  color: #1c1503;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mx-mark-route .mx-pin,
.mx-mark-next .mx-pin,
.mx-mark-home .mx-pin {
  left: -0.8rem;
  top: -0.8rem;
  min-width: 1.6rem;
  width: auto;
  height: 1.6rem;
  padding: 0 0.3rem;
  border-radius: 0.8rem;
  display: grid;
  place-items: center;
  background: var(--mx-route);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.mx-mark-next .mx-pin {
  animation: mx-pulse 1.6s ease-out infinite;
}
/* (its stop pointed at in the route's list) */
.mx-mark-hot {
  z-index: 4;
}
.mx-mark-hot .mx-pin {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.mx-marks .mx-mark-hot .mx-mark-name {
  display: block;
}
@keyframes mx-pulse {
  0% {
    box-shadow:
      0 1px 4px rgba(0, 0, 0, 0.6),
      0 0 0 0 rgba(255, 209, 102, 0.6);
  }
  100% {
    box-shadow:
      0 1px 4px rgba(0, 0, 0, 0.6),
      0 0 0 0.9rem rgba(255, 209, 102, 0);
  }
}
/* a run under way: the stops after the next one are small and grey, their goods left to the list */
.mx-mark-later .mx-pin {
  left: -0.6rem;
  top: -0.6rem;
  min-width: 1.2rem;
  width: auto;
  height: 1.2rem;
  padding: 0 0.2rem;
  border-radius: 0.6rem;
  display: grid;
  place-items: center;
  background: #8b93a3;
  color: #0d0f13;
  font-size: 0.625rem;
  box-shadow: none;
}
.mx-mark-later .mx-mark-icons {
  display: none;
}
.mx-mark-later .mx-pin.mx-pin-glyph {
  opacity: 0.6;
}
.mx-mark-home .mx-pin {
  background: var(--mx);
}
.mx-mark-home .mx-pin:empty::before {
  content: '';
  width: 0.8rem;
  height: 0.8rem;
  background: #0d0f13;
  clip-path: polygon(50% 5%, 100% 48%, 84% 48%, 84% 95%, 16% 95%, 16% 48%, 0 48%);
}
.mx-mark-shortcut .mx-pin,
.mx-mark-portal .mx-pin {
  left: -0.45rem;
  top: -0.45rem;
  min-width: 0;
  width: 0.9rem;
  height: 0.9rem;
  padding: 0;
  border-radius: 0.15rem;
  transform: rotate(45deg);
  background: var(--mx-route);
}
.mx-mark-icons {
  position: absolute;
  left: 0;
  bottom: 1.05rem;
  display: flex;
  gap: 0.15rem;
  transform: translateX(-50%);
}
.mx-mark-icon {
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: 0.4rem;
  background: rgba(13, 15, 19, 0.88);
  border: 2px solid var(--mx-buy);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}
.mx-mark-icon.mx-at-sell {
  border-color: var(--mx-sell);
}
.mx-mark-icon.mx-at-take {
  border-color: var(--mx);
}
.mx-mark-icon.mx-at-leave,
.mx-mark-icon.mx-at-collect {
  border-color: var(--warn);
}
.mx-mark-icon img {
  width: 1.3rem;
  height: 1.3rem;
  object-fit: contain;
}
.mx-mark-name {
  position: absolute;
  left: 0;
  top: 1.05rem;
  transform: translateX(-50%);
  padding: 0.1rem 0.4rem;
  border-radius: 0.3rem;
  background: rgba(13, 15, 19, 0.82);
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
  text-shadow: 0 1px 2px #000;
  display: none;
}
.mx-mark-idle .mx-mark-name {
  top: 0.55rem;
  font-weight: 500;
  color: var(--fg1);
}
/* names: the run's stops unless the city is far off, every shop once it is near */
.mx-marks:not(.mx-far) .mx-mark-route .mx-mark-name,
.mx-marks:not(.mx-far) .mx-mark-next .mx-mark-name,
.mx-marks.mx-near .mx-mark-name,
.mx-mark:hover .mx-mark-name {
  display: block;
}
/* (a shortcut's mouth and a portal stone are named only when pointed at: their diamonds say what they are) */
.mx-marks .mx-mark-shortcut:not(:hover) .mx-mark-name,
.mx-marks .mx-mark-portal:not(:hover) .mx-mark-name {
  display: none;
}
.mx-mark:hover {
  z-index: 3;
}
.mx-mark-next,
.mx-mark-route {
  z-index: 2;
}
.mx-marks.mx-far .mx-mark-icons {
  display: none;
}
.mx-you {
  position: absolute;
  left: -0.5rem;
  top: -0.5rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #4da3ff;
  border: 2.5px solid #fff;
  box-shadow: 0 0 0 0.3rem rgba(77, 163, 255, 0.3);
  box-sizing: border-box;
  pointer-events: none;
  z-index: 4;
}
.mx-pin.mx-pin-glyph {
  left: -0.5625rem;
  top: -0.5625rem;
  width: 1.125rem;
  height: 1.125rem;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  transform: none;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9));
}
.mx-pin-glyph img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.mx-mark-idle .mx-pin-glyph {
  opacity: 0.85;
}
.mx-mark-home .mx-pin.mx-pin-glyph,
.mx-mark-route .mx-pin.mx-pin-glyph,
.mx-mark-next .mx-pin.mx-pin-glyph {
  left: -0.875rem;
  top: -0.875rem;
  width: 1.75rem;
  height: 1.75rem;
}
.mx-mark-home .mx-pin-glyph:empty::before {
  content: none;
}
.mx-map-buttons {
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  display: flex;
  gap: 0.375rem;
  align-items: center;
  z-index: 5;
}
.mx-map-buttons .btn-mini {
  padding: 0.375rem 0.625rem;
  font-size: 0.75rem;
  background: rgba(20, 24, 31, 0.92);
  backdrop-filter: blur(6px);
}
/* (the stop to go to now, over the map's foot: where the map is all there is, a phone's map and a panel folded
   away) */
.mx-map-next {
  display: none;
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: 0.5rem;
  z-index: 5;
  max-width: 26rem;
}
.mx-map-next .mx-next {
  background: rgba(26, 30, 38, 0.96);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}
.mx-map-next .mx-next h2 {
  font-size: 1.125rem;
  margin-bottom: 0.375rem;
}
.mx-map-next .mx-next-foot {
  margin-top: 0.5rem;
}
.mx-panel-closed .mx-map-next {
  display: block;
}
/* ---- the panel's inner edge (wide pages): dragged to resize it, its tab folds it away */
.mx-edge {
  grid-column: 1;
  grid-row: 1 / 3;
  position: relative;
  z-index: 6;
  pointer-events: none;
}
.mx-edge > * {
  pointer-events: auto;
}
.mx-panel-toggle {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  width: 0.9375rem;
  height: 4rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 0.375rem 0.375rem 0;
  background: var(--bg1);
  color: var(--fg2);
  font-size: 0.8125rem;
  line-height: 1;
  cursor: pointer;
}
.mx-panel-toggle:hover {
  background: var(--bg3);
  color: var(--fg0);
}
.mx.mx-panel-closed {
  grid-template-columns: 0 minmax(0, 1fr);
}
.mx-panel-closed > .mx-head,
.mx-panel-closed > .mx-body,
.mx-panel-closed > .mx-sheet,
.mx-panel-closed .mx-edge > .rz-handle {
  display: none;
}
.mx-tabs {
  display: none;
}

/* ---- a wide page's layouts: the switch in the header, and the bounties alone across the page (.mx-full) */
.mx-layout {
  display: flex;
  gap: 0.125rem;
  padding: 0.125rem;
  border-radius: 0.5rem;
  border: 1px solid var(--line);
  background: var(--bg0);
}
.mx-layout button {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.375rem;
  border: 0;
  border-radius: 0.375rem;
  background: none;
  color: var(--fg1);
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
}
.mx-layout svg {
  width: 1.375rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mx-layout button {
  padding: 0.25rem 0.5rem;
}
/* (over the map's corner: on the map's own dark glass) */
.mx-map-buttons .mx-layout {
  background: rgba(20, 24, 31, 0.92);
  backdrop-filter: blur(6px);
}
.mx-layout button:hover {
  color: var(--fg0);
}
.mx-layout button[aria-pressed='true'] {
  background: var(--bg3);
  color: var(--mx);
}
.mx-layout button:focus-visible {
  outline: 2px solid var(--mx);
  outline-offset: 1px;
}
@media (min-width: 56.25rem) {
  .mx.mx-full {
    grid-template-columns: minmax(0, 1fr) 0;
  }
  .mx-full > .mx-map,
  .mx-full > .mx-edge {
    display: none;
  }
  .mx-full > .mx-head,
  .mx-full > .mx-body {
    border-right: 0;
  }
  .mx-full > .mx-body {
    display: flex;
    padding: 0;
    overflow: hidden;
  }
}

/* ---- the desk (src/merchant/desk.tsx): the player's bounties and a board's, two grids of six as the game shows
   them, and under them what the page would do and the run's button */
.mx-desk {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}
.mx-desk-note {
  grid-column: 1 / -1;
  margin: 0.625rem 1.25rem 0;
}
.mx-desk-half {
  grid-row: 2;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.mx-desk-half + .mx-desk-half {
  border-left: 1px solid var(--line);
}
/* (on a run, across a wide page: the run's steps in a third column, as the side panel has them; the boards' grid
   two across in the room that leaves) */
.mx-desk.mx-desk-run,
.mx-desk.mx-desk-two.mx-desk-run {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(20rem, 28rem);
}
.mx-desk-run .mx-desk-steps {
  grid-column: 3;
}
.mx-desk-steps {
  grid-row: 2;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem 1.25rem;
  border-left: 1px solid var(--line);
}
.mx-desk-steps h2 {
  margin: 0 0 0.25rem;
  min-height: 2rem;
  display: flex;
  align-items: center;
  font-size: 1rem;
}
.mx-desk-steps .mx-route {
  margin-top: 0;
}
.mx-desk-run.mx-desk-two .mx-desk-half + .mx-desk-half .mx-desk-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.mx-desk-half h2 {
  margin: 0;
  min-height: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}
.mx-desk-half h2 small {
  color: var(--fg1);
  font-size: 0.8125rem;
  font-weight: 500;
}
.mx-desk-half h2 .mx-link {
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 500;
}
/* (a head's links, side by side at its end: Pick up all beside Clear all) */
.mx-head-links {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
}
.mx-desk-half h2 .mx-head-links .mx-link {
  margin-left: 0;
}
#merchant-pickup-all {
  color: var(--mx-take);
}
.mx-desk-board {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
/* (each board's name over its places, when both are one section) */
.mx-desk-group {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg2);
}
.mx-board-group + .mx-board-group {
  margin-top: 0.625rem;
}
.mx-board-group .mx-desk-group {
  display: block;
  margin: 0 0 0.375rem;
}
/* (both boards: their twelve places three across, the player's six two across, every card the same width) */
.mx-desk-two {
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
}
.mx-desk-two .mx-desk-half + .mx-desk-half .mx-desk-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.mx-desk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem 0.5rem;
}
/* a bounty, a tile of its grid as the game lays them out: its picture, its name, its two letters; all of it one
   button. What the page says of it sits on the tile's edge, so the tile stays as small as its name */
.mx-card {
  position: relative;
  min-height: 2.75rem;
  border-radius: 0.625rem;
  border: 1.5px solid var(--line);
  background: var(--bg2);
  color: var(--fg0);
}
.mx-card-main {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 0.5rem;
  padding: 0.25rem 2.125rem 0.25rem 0.5rem;
  border: 0;
  border-radius: inherit;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.mx-card-main:disabled {
  cursor: default;
}
.mx-card-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
}
/* the word in a card's corner: what the page says to do with it, or (under the pointer) what a click on it does. Over
   the rarity steps and the line beside them (z-index 1), which reach the card's top on a phone */
.mx-verdict,
.mx-card-do {
  position: absolute;
  top: -0.5rem;
  right: 0.5rem;
  z-index: 2;
  padding: 0.0625rem 0.375rem;
  border-radius: 0.3125rem;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  pointer-events: none;
}
/* (a verdict may say more than a word, "Swap for Tin Pocket Watch": it keeps to its tile) */
.mx-verdict {
  max-width: calc(100% - 1rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mx-card-do {
  opacity: 0;
  background: var(--bg1);
  border: 1px solid currentColor;
}
.mx-offer .mx-card-do {
  color: var(--mx-take);
}
.mx-mine .mx-card-do {
  color: var(--mx-sell);
}
@media (hover: hover) {
  .mx-card-main:hover:not(:disabled) .mx-card-do {
    opacity: 1;
  }
  .mx-card:has(.mx-card-main:hover:not(:disabled)) {
    border-color: var(--fg1);
  }
  .mx-card:has(.mx-card-main:hover) .mx-verdict {
    opacity: 0;
  }
}
.mx-verdict-take {
  background: var(--mx-take);
  color: #0c1f13;
}
.mx-verdict-drop {
  background: var(--mx-sell);
  color: #2a0d0b;
}
.mx-card.mx-take {
  border-color: var(--mx-take);
  background: #16241c;
}
.mx-card.mx-drop {
  border-color: var(--mx-sell);
  background: #261817;
}
.mx-card > .mx-code {
  position: absolute;
  right: 0.375rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
/* (whether its goods are bought: said once they are, offered under the pointer before) */
.mx-card .mx-state {
  position: absolute;
  left: 2.75rem;
  bottom: -0.6875rem;
  z-index: 1;
  width: auto;
  padding: 0 0.375rem;
  border: 1px solid var(--line);
  border-radius: 0.3125rem;
  background: var(--bg1);
  font-size: 0.6875rem;
}
.mx-card .mx-state:not(.mx-state-on) {
  opacity: 0;
}
.mx-card:hover .mx-state,
.mx-card .mx-state:focus-visible {
  opacity: 1;
}
.mx-card.mx-bought .mx-state {
  border-color: var(--mx-take);
  color: var(--mx-take);
}
/* (the cross that takes an offer off the board again: in the card's corner, under the pointer) */
.mx-card .mx-x {
  top: -0.4375rem;
  left: -0.4375rem;
  right: auto;
  opacity: 0;
}
.mx-card:hover .mx-x,
.mx-card .mx-x:focus-visible {
  opacity: 1;
}
@media (hover: none) {
  .mx-card .mx-x {
    opacity: 1;
  }
}
.mx-card-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-style: dashed;
  background: none;
  color: var(--fg2);
  font: inherit;
  font-size: 1.125rem;
  cursor: pointer;
}
.mx-card-empty:hover {
  border-color: var(--mx);
  color: var(--mx);
}
/* the place being typed into */
.mx-card-entry {
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1.5px solid var(--accent-dim);
  background: var(--bg2);
}
.mx-card-entry input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.3125rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid var(--mx);
  background: var(--bg0);
  color: var(--fg0);
  font: inherit;
  font-size: 1rem;
}
.mx-card-entry input:focus {
  outline: none;
}
.mx-card-keys {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  width: max-content;
  max-width: min(24rem, 80vw);
  z-index: 1;
  padding: 0.25rem 0.375rem;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  background: var(--bg1);
  box-shadow: 0 0.375rem 0.75rem rgba(0, 0, 0, 0.4);
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.3125rem;
  font-size: 0.6875rem;
  color: var(--fg1);
}
.mx-card-keys kbd {
  padding: 0.0625rem 0.25rem;
  border-radius: 0.25rem;
  border: 1px solid var(--line);
  background: var(--bg3);
  color: var(--fg1);
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.15;
}
.mx-card-keys kbd:not(:first-child) {
  margin-left: 0.375rem;
}
/* (what was typed, found: under the place, over the places below it) */
.mx-hits.mx-card-hits {
  position: absolute;
  top: 2.625rem;
  left: -2px;
  right: -2px;
  max-height: 17.5rem;
  margin: 0;
  padding: 0.3125rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1.5px solid var(--accent-dim);
  border-top: 0;
  border-radius: 0 0 0.75rem 0.75rem;
  background: var(--bg2);
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.5);
}
.mx-desk-foot {
  grid-column: 1 / -1;
  grid-row: 4;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--line);
  background: var(--bg0);
}
.mx-desk-best {
  flex: 1;
  min-width: 0;
}
.mx-desk-best p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--fg0);
}
.mx-word-take {
  color: var(--mx-take);
}
.mx-word-drop {
  color: var(--mx-sell);
}
.mx-desk-route {
  list-style: none;
  margin: 0.4375rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--fg1);
  white-space: nowrap;
}
.mx-desk-route li {
  display: flex;
  align-items: center;
  gap: 0.3125rem;
  padding: 0.125rem 0.5rem 0.125rem 0.1875rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--bg2);
}
.mx-desk-route b {
  width: 1.125rem;
  height: 1.125rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mx-route);
  color: #1c1503;
  font-size: 0.6875rem;
}
/* (the run's figures lead the foot, the button at its end) */
.mx-desk-foot .mx-summary {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 0.875rem;
}
.mx-desk-foot .mx-summary b {
  font-size: 1.25rem;
}
.mx-desk-go {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.mx-desk-go .btn {
  margin: 0;
  width: auto;
  padding: 0.75rem 1.375rem;
  font-size: 0.9375rem;
}
/* the stop to go to now: one card wherever a run shows it (focus, and over the map) */
.mx-next {
  padding: 0.875rem;
  border-radius: 0.75rem;
  border: 1.5px solid var(--mx);
  background: var(--bg2);
}
.mx-next .mx-travel {
  padding: 0;
  font-size: 0.8125rem;
}
.mx-next h2 {
  margin: 0.125rem 0 0.5rem;
  font-size: 1.375rem;
  line-height: 1.2;
}
.mx-next .mx-acts {
  gap: 0.375rem;
}
.mx-next .mx-act-word {
  min-width: 3.25rem;
  font-size: 1rem;
}
.mx-next .mx-act-take .mx-act-word,
.mx-next .mx-act-ground .mx-act-word {
  min-width: 5.25rem;
}
.mx-next .mx-act-name {
  font-size: 1.0625rem;
}
.mx-next-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.875rem;
}
.mx-next-foot .mx-primary {
  margin-left: auto;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* ---- phones: one view at a time */
@media (max-width: 56.24rem) {
  /* (the Bounties tab is the desk: its places one scroll, the run's foot kept at the bottom) */
  .mx-narrow-desk > .mx-body {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
  }
  .mx-narrow-desk .mx-desk {
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .mx-narrow-desk .mx-desk-half {
    overflow: visible;
    padding: 0.875rem 0.875rem 1rem;
  }
  .mx-narrow-desk .mx-desk-half + .mx-desk-half {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .mx-narrow-desk .mx-desk-grid,
  .mx-narrow-desk .mx-desk-two .mx-desk-half + .mx-desk-half .mx-desk-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mx-narrow-desk .mx-desk-foot {
    position: sticky;
    bottom: 0;
    z-index: 2;
    flex-wrap: wrap;
    gap: 0.625rem 1rem;
    padding: 0.625rem 0.875rem;
  }
  .mx-narrow-desk .mx-desk-best {
    flex: 1 1 100%;
  }
  .mx-narrow-desk .mx-desk-foot .mx-summary {
    flex: 1 1 auto;
  }
  .mx-narrow-desk .mx-desk-go {
    flex: 1 1 100%;
  }
  .mx-narrow-desk .mx-desk-go > .btn {
    flex: 1 1 0;
    min-width: 0;
  }
  .mx {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  .mx-head,
  .mx-body {
    border-right: 0;
  }
  .mx-body,
  .mx-map {
    grid-column: 1;
    grid-row: 2;
  }
  .mx-body {
    padding-bottom: 1.25rem;
  }
  .mx-tab-map .mx-body {
    display: none;
  }
  .mx-edge {
    display: none;
  }
  .mx.mx-panel-closed {
    grid-template-columns: minmax(0, 1fr);
  }
  .mx-panel-closed > .mx-head {
    display: flex;
  }
  .mx-panel-closed > .mx-body {
    display: block;
  }
  .mx-panel-closed.mx-tab-map > .mx-body {
    display: none;
  }
  .mx-map-next {
    max-width: none;
  }
  .mx-next {
    padding: 0.625rem 0.75rem;
  }
  .mx-next h2 {
    font-size: 1.1875rem;
    margin-bottom: 0.375rem;
  }
  .mx-next-foot {
    margin-top: 0.5rem;
  }
  .mx:not(.mx-tab-map) .mx-map {
    visibility: hidden;
    pointer-events: none;
  }
  .mx-tab-bounties .mx-route,
  .mx-tab-route .mx-bounties {
    display: none;
  }
  .mx-tab-route .mx-route {
    margin-top: 0.75rem;
  }
  .mx-slot {
    min-height: 6.25rem;
  }
  .mx-goods {
    width: 2.75rem;
    height: 2.75rem;
  }
  .mx-goods.mx-small {
    width: 1.25rem;
    height: 1.25rem;
  }
  .mx-goods.mx-mid {
    width: 2rem;
    height: 2rem;
  }
  .mx-goods.mx-large {
    width: 2.75rem;
    height: 2.75rem;
  }
  .mx-cta {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 1rem -0.75rem 0;
    padding: 0.625rem 0.75rem;
    border-top: 1px solid var(--line);
    background: var(--bg2);
    font-size: 0.875rem;
  }
  .mx-tabs {
    grid-column: 1;
    grid-row: 3;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
    background: var(--bg0);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mx-tabs button {
    position: relative;
    height: 3.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    border: 0;
    background: none;
    color: var(--fg2);
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
  }
  .mx-tabs .mx-ui {
    width: 1.5rem;
    height: 1.5rem;
    opacity: 0.6;
  }
  .mx-tabs button[aria-pressed='true'] {
    color: var(--fg0);
    box-shadow: inset 0 2px 0 var(--mx);
  }
  .mx-tabs button[aria-pressed='true'] .mx-ui {
    opacity: 1;
  }
  .mx-tabs i {
    position: absolute;
    top: 0.3125rem;
    left: calc(50% + 0.625rem);
    min-width: 1rem;
    padding: 0 0.25rem;
    box-sizing: border-box;
    border-radius: 0.5rem;
    background: var(--mx);
    color: #0d0f13;
    font-size: 0.625rem;
    font-style: normal;
    font-weight: 800;
    line-height: 1rem;
  }
  .mx-sheet,
  .mx-picker-sheet {
    grid-column: 1;
    grid-row: 1 / 4;
    border-right: 0;
  }
  .mx-sheet {
    grid-row: 2 / -1;
  }
  .mx-picker-sheet {
    z-index: 6;
    margin: 0;
    padding: 0.625rem 0.75rem 0;
    border: 0;
    border-radius: 0;
    background: var(--bg1);
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .mx-picker-sheet .mx-picker-head strong {
    font-size: 1rem;
  }
  /* (the sheet's controls, the board and Done, in a bar along its foot: in reach of a thumb, and clear of the top
     edge, which some phones' browsers lay their own glass over, taking its taps) */
  .mx-picker-sheet .mx-picker-head {
    order: 9;
    flex: none;
    margin: 0 -0.75rem;
    padding: 0.625rem 0.75rem calc(0.625rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--bg1);
  }
  .mx-picker-sheet .mx-picker-head .btn {
    min-height: 2.75rem;
    padding: 0 1.25rem;
  }
  .mx-picker-sheet .mx-grid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-content: start;
    padding-bottom: 1rem;
  }
  .mx-picker-sheet .mx-tile {
    min-height: 5rem;
  }
  /* (inputs at 16px: iOS zooms the page into anything smaller) */
  .mx-picker input[type='search'],
  .mx-field input {
    font-size: 1rem;
  }
  .mx-map-next {
    display: block;
  }
}
/* (under a finger the marks let every touch through to the map, which pans and pinches wherever it is touched; a
   tap on one is the map's to pass on: route-map.ts) */
@media (pointer: coarse) {
  .mx-mark {
    pointer-events: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mx-mark-next .mx-pin {
    animation: none;
  }
}

/* ---- what to do now, kept in sight at the top of the panel: the stop to go to, or the run to start */
.mx-now {
  position: sticky;
  top: 0;
  z-index: 3;
  margin: 0 -0.75rem 0.5rem;
  padding: 0.625rem 0.75rem 0.75rem;
  background: var(--bg1);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 0.5rem 1rem -0.5rem rgba(0, 0, 0, 0.6);
}
.mx-now .mx-first {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--bg2);
}
.mx-now .mx-legs {
  margin: 0 0 0.375rem;
}

/* ---- a bounty's rarity, as the game marks it: "×3" in its rim colour on its face colour; a rarer card tinted in it,
   with a stripe down its side (the commonest looks as any card, its mark quiet) */
.mx-rarity {
  display: inline-grid;
  place-items: center;
  min-width: 1.75rem;
  height: 1.125rem;
  padding: 0 0.3125rem;
  box-sizing: border-box;
  border-radius: 0.3125rem;
  border: 1px solid var(--line);
  background: var(--bg1);
  color: var(--fg2);
  font: 700 0.6875rem/1 var(--sans);
  letter-spacing: 0.02em;
}
.mx-rarity-on {
  border-color: var(--rim);
  background: var(--face);
  color: var(--rim);
}
button.mx-rarity {
  cursor: pointer;
}
button.mx-rarity:hover {
  border-color: var(--fg1);
  color: var(--fg0);
}
button.mx-rarity.mx-rarity-on:hover {
  border-color: var(--rim);
  color: #fff;
}
.mx-rare {
  background-image: linear-gradient(135deg, color-mix(in srgb, var(--rim) 20%, transparent), transparent 70%);
  box-shadow: inset 4px 0 0 var(--rim);
}
/* (a bounty's rarity on its picture's foot: shown when it is rarer than the commonest, offered under the pointer) */
.mx-card .mx-rarity {
  position: absolute;
  left: 0.5rem;
  bottom: 0.125rem;
  width: 1.75rem;
  padding: 0;
  font-size: 0.625rem;
  line-height: 1.2;
}
@media (max-width: 56.24rem) {
  .mx-card .mx-rarity {
    width: 2rem;
  }
}
.mx-card .mx-rarity:not(.mx-rarity-on) {
  opacity: 0;
}
.mx-card:hover .mx-rarity,
.mx-card .mx-rarity:focus-visible {
  opacity: 1;
}
.mx-slot .mx-rarity {
  position: absolute;
  top: 0.375rem;
  left: 0.375rem;
  z-index: 1;
}
.mx-goods-rare {
  box-shadow: 0 0 0 2px var(--rim);
  border-radius: 0.375rem;
}
.mx-card-entry .mx-entry-rarity {
  position: absolute;
  top: 1.1875rem;
  right: 2.75rem;
  pointer-events: none;
}
.mx-entry-rarity .mx-rarity {
  position: static;
  width: auto;
}
.mx-entry-rarity {
  display: inline-flex;
  flex: none;
}

/* the time to a board's new bounties, quiet under an empty place's + */
.mx-slot-clock {
  display: block;
  margin-top: 0.25rem;
  font: 600 0.6875rem/1 var(--sans);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--fg2);
  opacity: 0.75;
}

/* ---- ?debug: the tap readout (src/merchant/taps.tsx) */
.mx-taps {
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
}
.mx-taps i {
  position: absolute;
  width: 1.5rem;
  height: 1.5rem;
  margin: -0.75rem 0 0 -0.75rem;
  border-radius: 50%;
  background: rgba(255, 64, 64, 0.55);
  box-shadow: 0 0 0 2px #fff;
}
.mx-taps pre {
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  top: 40%;
  margin: 0;
  padding: 0.375rem 0.5rem;
  border-radius: 0.375rem;
  background: rgba(0, 0, 0, 0.82);
  color: #9ef09e;
  font: 0.6875rem/1.35 var(--mono);
  white-space: pre-wrap;
}

/* ---- the panel on the map's right (a setting; wide pages): the columns the other way, its inner edge its left */
@media (min-width: 56.25rem) {
  .mx.mx-right {
    grid-template-columns: minmax(0, 1fr) var(--mx-panel, 28rem);
  }
  .mx.mx-right.mx-panel-closed {
    grid-template-columns: minmax(0, 1fr) 0;
  }
  .mx-right > .mx-head,
  .mx-right > .mx-body,
  .mx-right > .mx-sheet,
  .mx-right > .mx-edge {
    grid-column: 2;
  }
  .mx-right > .mx-map {
    grid-column: 1;
  }
  .mx-right > .mx-head,
  .mx-right > .mx-body,
  .mx-right > .mx-sheet {
    border-right: 0;
    border-left: 1px solid var(--line);
  }
  .mx-right .mx-panel-toggle {
    left: auto;
    right: 100%;
    border-left: 1px solid var(--line);
    border-right: 0;
    border-radius: 0.375rem 0 0 0.375rem;
  }
}
/* why the page says to drop bounties, under them */
.mx-drop-why {
  margin: 0.5rem 0 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--fg2);
}
.mx-why b {
  color: var(--fg0);
}
/* (a phone: the desk's places two across, as the game's own; what is found for a place being typed into is two
   places wide, opening toward the middle) */
@media (max-width: 33.75rem) {
  .mx-narrow-desk .mx-desk-grid > .mx-card-entry .mx-card-hits {
    right: auto;
    width: calc(200% + 0.5rem + 7px);
  }
  .mx-narrow-desk .mx-desk-grid > .mx-card-entry:nth-child(2n) .mx-card-hits {
    left: auto;
    right: -2px;
  }
  .mx-narrow-desk .mx-desk-grid > .mx-card-entry:nth-child(2n) .mx-card-keys {
    left: auto;
    right: 0;
  }
  .mx-narrow-desk .mx-desk-foot .mx-desk-route {
    display: none;
  }
  .mx-narrow-desk .mx-desk-best p {
    font-size: 0.8125rem;
    line-height: 1.35;
  }
  .mx-narrow-desk .mx-desk-foot .mx-summary {
    gap: 0.25rem 0.75rem;
    font-size: 0.75rem;
  }
  .mx-narrow-desk .mx-desk-foot .mx-summary b {
    font-size: 1rem;
  }
  .mx-narrow-desk .mx-desk-go > .btn {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    font-size: 0.875rem;
  }
}
/* (typing on a touch screen: its keyboard takes the room, the run's foot waits until the bounty is in) */
@media (max-width: 56.24rem) and (pointer: coarse) {
  .mx-narrow-desk .mx-desk:has(.mx-card-entry) .mx-desk-foot {
    display: none;
  }
}

/* the board's clock set by the game's, in the settings: the time it shows, a second either way, "It changed now", or
   the game's time typed in */
.mx-cal {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.mx-cal-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}
.mx-cal-now {
  margin-right: auto;
  color: var(--fg2);
  font-size: 0.8125rem;
}
.mx-cal-now b {
  color: var(--fg0);
  font-variant-numeric: tabular-nums;
}
.mx-cal input {
  width: 5rem;
  padding: 0.3125rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  background: var(--bg1);
  color: var(--fg0);
  font: inherit;
  font-size: 0.8125rem;
}
.mx-cal input.mx-cal-bad {
  border-color: var(--mx-sell);
}
.mx-cal .mx-hint {
  margin: 0;
}

/* the panel's places as compact as the desk's cards: a rarity only when rarer, a held bounty's state once bought,
   each there under the pointer */
.mx-slot .mx-rarity:not(.mx-rarity-on),
.mx-slot .mx-state:not(.mx-state-on) {
  opacity: 0;
}
.mx-slot:hover .mx-rarity,
.mx-slot .mx-rarity:focus-visible,
.mx-slot:hover .mx-state,
.mx-slot .mx-state:focus-visible {
  opacity: 1;
}

/* the first visit's dialog (welcome.ts): a row a question, the game's own icon, what it is for, its control */
.mx-welcome {
  --mx: var(--accent);
  width: min(36rem, 100%);
}
.modal.card.mx-welcome {
  padding: 1.25rem 1.25rem 1.125rem;
  gap: 0.875rem;
}
.modal.card.mx-welcome h2 {
  font-size: 1.25rem;
  letter-spacing: -0.005em;
}
.mx-welcome .mx-rows {
  margin: 0;
}
/* (its two buttons together at its end, each wide enough to press; a phone: the two across its width) */
.mx-welcome .modal-actions {
  justify-content: flex-end;
  gap: 0.625rem;
  margin-top: 0.125rem;
}
.mx-welcome .modal-actions .btn {
  min-width: 7rem;
  min-height: 2.5rem;
  justify-content: center;
}
@media (max-width: 30rem) {
  .mx-welcome .modal-actions .btn {
    flex: 1;
  }
}
/* the way to Analysis, from the first visit's dialog and from Settings' top: a row that is a link, the brain its
   button has, its name, a line on what it is, and a mark that it leads on */
.mx-to-analysis {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0 0;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--line-soft);
  border-radius: 0.625rem;
  background: var(--bg2);
  color: inherit;
  text-decoration: none;
}
.mx-to-analysis:hover,
.mx-to-analysis:focus-visible {
  border-color: var(--mx);
  text-decoration: none;
}
.mx-to-analysis .ic {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: var(--mx);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mx-to-analysis b {
  display: block;
  color: var(--fg0);
  font-weight: 600;
}
.mx-to-analysis small {
  display: block;
  color: var(--fg1);
  font-size: 0.8125rem;
  line-height: 1.35;
}
.mx-to-analysis-go {
  color: var(--fg1);
  font-size: 1.375rem;
  line-height: 1;
}
.mx-to-analysis:hover .mx-to-analysis-go {
  color: var(--mx);
}
.mx-sheet .mx-to-analysis {
  margin: 0.875rem 0 0;
  padding: 0.5rem 0.75rem;
}
.mx-rows {
  display: flex;
  flex-direction: column;
  margin: 0.25rem 0 0.75rem;
  border: 1px solid var(--line-soft);
  border-radius: 0.625rem;
  background: var(--bg2);
}
.mx-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
}
.mx-row + .mx-row {
  border-top: 1px solid var(--line-soft);
}
label.mx-row {
  cursor: pointer;
}
.mx-row-icon {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}
.mx-row-what b {
  display: block;
  font-weight: 600;
  color: var(--fg0);
}
.mx-row-what small {
  display: block;
  color: var(--fg2);
  font-size: 0.8125rem;
  line-height: 1.35;
}
.mx-level {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.mx-level input {
  width: 3rem;
  padding: 0.3125rem 0.375rem;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  background: var(--bg1);
  color: var(--fg0);
  font: 600 0.9375rem/1 var(--mono, ui-monospace, monospace);
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}
/* (no stepper arrows: two digits need the whole box) */
.mx-level input::-webkit-inner-spin-button,
.mx-level input::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}
.mx-level input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.mx-glyph {
  width: 1.125rem;
  height: 1.125rem;
  object-fit: contain;
  margin-right: 0.25rem;
}
.mx-row input[role='switch'] {
  appearance: none;
  width: 2.5rem;
  height: 1.5rem;
  margin: 0;
  border-radius: 1rem;
  background: var(--bg3, var(--line));
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
}
.mx-row input[role='switch']::before {
  content: '';
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: var(--fg1);
  transition: transform 0.15s;
}
.mx-row input[role='switch']:checked {
  background: var(--mx);
}
.mx-row input[role='switch']:checked::before {
  transform: translateX(1rem);
  background: #0d0f13;
}
.mx-picks {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  overflow: hidden;
}
.mx-picks button {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.625rem;
  border: 0;
  background: transparent;
  color: var(--fg1);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.mx-picks button + button {
  border-left: 1px solid var(--line);
}
.mx-picks button[aria-pressed='true'] {
  background: color-mix(in oklab, var(--accent) 22%, transparent);
  color: var(--fg0);
}
/* (the way on to the rest of the settings: the cogwheel of the page's own settings button) */
.mx-welcome-settings {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}
.mx-welcome-settings svg.ic {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* (what scrolls when the dialog is taller than the screen: its title and its buttons stay) */
.mx-welcome-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mx-welcome-body > p:first-child {
  margin-top: 0;
}
.mx-welcome-body > p:last-child {
  margin-bottom: 0;
}
@media (max-width: 30rem) {
  .modal.card.mx-welcome {
    max-height: 92dvh;
  }
  .mx-row {
    grid-template-columns: 1.5rem minmax(0, 1fr) auto;
    gap: 0.625rem;
    padding: 0.5rem 0.625rem;
  }
  .mx-row-icon {
    width: 1.5rem;
    height: 1.5rem;
  }
  .mx-level input {
    width: 2.5rem;
  }
  .mx-level .mx-glyph {
    margin-right: 0;
  }
  /* (the two choices are too wide to sit beside their name) */
  .mx-row-under {
    grid-column: 2 / -1;
  }
}

/* a number with its unit, a row's control (the settings) */
.mx-amount {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.mx-amount i {
  font-style: normal;
  color: var(--fg2);
  font-size: 0.75rem;
}
.mx-amount input {
  width: 3.5rem;
  padding: 0.3125rem 0.375rem;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  background: var(--bg1);
  color: var(--fg0);
  font: 600 0.9375rem/1 var(--mono, ui-monospace, monospace);
  text-align: center;
}
.mx-amount input {
  appearance: textfield;
  -moz-appearance: textfield;
}
.mx-amount input::-webkit-inner-spin-button,
.mx-amount input::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}
.mx-amount input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
/* a level said the game's way, in running text */
.mx-level-text {
  display: inline-flex;
  align-items: center;
  gap: 0.0625rem;
  font-weight: 600;
  color: var(--fg0);
  white-space: nowrap;
}
.mx-level-text .mx-glyph {
  width: 0.875em;
  height: 0.875em;
  margin: 0 0.125rem 0 0.0625rem;
}
/* the settings: a card a group, a row a setting (the rows are the first visit's dialog's) */
.mx-sheet .mx-rows {
  margin: 0;
}
.mx-sheet .mx-row {
  grid-template-columns: 2.125rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}
.mx-sheet .mx-row-icon {
  width: 1.5rem;
  height: 1.5rem;
  justify-self: center;
}
/* (a picture of two: side by side across the icons' column) */
.mx-sheet .mx-art-2.mx-row-icon {
  width: 2.125rem;
}
.mx-sheet .mx-art-2 > .mx-art-piece {
  top: 0;
  width: 1rem;
  height: 100%;
}
.mx-sheet .mx-art-swap .mx-art-mark {
  bottom: -0.3125rem;
  width: 0.8125rem;
  height: 0.8125rem;
}
.mx-sheet .mx-row-what b {
  font-weight: 500;
}
.mx-sheet .mx-row-what small {
  font-size: 0.75rem;
}
.mx-sheet .mx-row-under {
  grid-column: 2 / -1;
}
.mx-sheet .mx-level input {
  width: 2.5rem;
}
.mx-sheet .mx-level .mx-glyph {
  margin-right: 0;
}
.mx-sheet .mx-rows > .mx-cal {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--line-soft);
}
.mx-sheet .mx-shortcuts {
  margin-top: 0.5rem;
}
.mx-sheet .mx-more .mx-hint {
  margin-top: 0.5rem;
}

/* ---- the Analysis view (analysis.tsx): over the planner, the shell's top bar still above it */
/* (under the tool's bar, which stays and whose Analysis button is pressed while this is shown: over the bounties,
   the map and a phone's tabs, the page's every row but the first; Joe, 2026-11-18) */
.mx-guide {
  position: relative;
  grid-column: 1 / -1;
  grid-row: 2 / -1;
  z-index: 30;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg0);
  --mx: var(--accent);
  -webkit-user-select: text;
  user-select: text;
}
.mx-guide-page {
  box-sizing: border-box;
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.25rem max(1rem, env(safe-area-inset-right, 0px)) 3rem max(1rem, env(safe-area-inset-left, 0px));
}
.mx-guide-head {
  margin-bottom: 1rem;
}
.mx-guide-head h1 {
  margin: 0 0 0.125rem;
  font-size: 1.5rem;
  line-height: 1.2;
}
.mx-guide-head p {
  margin: 0;
  color: var(--fg1);
}
.mx-guide-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.75rem 0 0.625rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg1);
}
.mx-guide-small {
  margin: 0.5rem 0 0;
  color: var(--fg2);
  font-size: 0.8125rem;
  line-height: 1.4;
}
.mx-guide-note {
  margin: 0.75rem 0 0;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius);
  background: var(--bg1);
  color: var(--fg1);
}
/* (the head of the page: the player's levels, and what the advice earns at them) */
.mx-guide-levels {
  margin: 0;
}
/* (a verdict: what kind of advice this is, in its colour) */
.mx-gkind {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  padding: 0.125rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--fg0);
  white-space: nowrap;
}
.mx-gkind::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--good);
}
.mx-gkind-optional::before,
.mx-gcard-optional .mx-gkind::before {
  background: var(--warn);
}
.mx-gkind-skip::before {
  background: var(--bad);
}
.mx-skips small {
  display: block;
  color: var(--fg2);
  font-size: 0.75rem;
}
.mx-gcards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.mx-gcards-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.mx-gcards-one {
  grid-template-columns: minmax(0, 1fr);
}
.mx-gcard {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--bg1);
}
.mx-gcard header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.mx-gcard header .mx-gkind {
  display: none;
}
.mx-gcard-icon {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
  flex: none;
}
.mx-gcard h3 {
  flex: 1;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.3;
  text-wrap: balance;
}
.mx-gcard-figure {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.125rem 0.5rem;
  margin: 0;
  color: var(--fg2);
  font-size: 0.8125rem;
}
.mx-gcard-figure b {
  font-size: 1.5rem;
  line-height: 1.1;
  color: var(--good);
  font-variant-numeric: tabular-nums;
}
.mx-gcard-optional .mx-gcard-figure b {
  color: var(--warn);
}
.mx-gcard-body {
  color: var(--fg1);
  font-size: 0.875rem;
  line-height: 1.45;
}
.mx-gcard footer {
  margin-top: auto;
  padding-top: 0.25rem;
}
.mx-walk {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: walk;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.mx-walk li {
  counter-increment: walk;
  display: grid;
  grid-template-columns: 1.375rem minmax(0, 1fr);
  gap: 0.5rem;
  align-items: start;
}
.mx-walk li::before {
  content: counter(walk);
  display: grid;
  place-items: center;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  background: var(--bg3);
  color: var(--fg0);
  font-size: 0.75rem;
  font-weight: 700;
}
.mx-guide-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 0.75rem;
}
.mx-skips {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--bg1);
}
.mx-skips li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  color: var(--fg1);
  font-size: 0.875rem;
}
.mx-skips li + li {
  border-top: 1px solid var(--line-soft);
}
.mx-skips b {
  color: var(--bad);
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
}
.mx-gains b {
  color: var(--good);
}
.mx-gtile {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line-soft);
  border-radius: 0.75rem;
  color: var(--fg2);
  font-size: 0.8125rem;
}
.mx-gtile b {
  color: var(--fg0);
  font-size: 0.9375rem;
}
@media (max-width: 48rem) {
  .mx-gcards,
  .mx-gcards-two,
  .mx-guide-split {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* (an empty place's clock beside its +, the tile no taller for it) */
.mx-card-empty .mx-slot-clock {
  margin-top: 0;
}

/* an advised setting's mark beside its name (parts.tsx, Rec): Recommended, or the way back to it */
.mx-row-title {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.125rem 0.5rem;
}
/* the Analysis view's two kinds, kept apart: Brighter Merchant's settings (a list, each as Settings names it) and
   the player's habits in the game (cards) */
.mx-wordmark {
  white-space: nowrap;
}
.mx-wordmark .brand-name {
  color: var(--fg0);
}
.mx-wordmark .brand-sub {
  margin-left: 0.125rem;
  color: var(--merchant);
  font-size: 0.78em;
  font-weight: 800;
}
.mx-guide-kind {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  margin: 2rem 0 0.75rem;
}
.mx-guide-kind > .ic,
.mx-guide-kind-icon {
  width: 1.75rem;
  height: 1.75rem;
  object-fit: contain;
}
.mx-guide-kind > .ic {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mx-guide-kind h2 {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.25;
}
.mx-guide-kind p {
  margin: 0.125rem 0 0;
  color: var(--fg1);
  font-size: 0.875rem;
}
.mx-gsets {
  margin: 0;
  background: var(--bg1);
  border-color: var(--line);
  border-radius: 0.75rem;
}
.mx-gset {
  align-items: start;
  padding: 0.75rem 1rem;
}
.mx-gset .mx-row-what small {
  margin-top: 0.125rem;
  color: var(--fg1);
  font-size: 0.875rem;
  line-height: 1.45;
}
.mx-gset-value {
  padding: 0.0625rem 0.4375rem;
  border-radius: 1rem;
  background: var(--bg3);
  color: var(--fg0);
  font-size: 0.75rem;
  font-weight: 700;
}
.mx-gset-figure {
  color: var(--good);
  font-size: 0.8125rem;
  font-weight: 700;
}
.mx-gcard header .mx-gkind {
  display: inline-flex;
}
.mx-skips small {
  margin-top: 0.125rem;
}
@media (max-width: 48rem) {
  .mx-gset {
    grid-template-columns: 1.5rem minmax(0, 1fr);
  }
}

/* what a setting or a habit changes at the player's levels (analysis.tsx, Figure): green up, red down, grey where
   it cannot be told from none; what it rests on opens under it */
.mx-fig {
  position: relative;
  display: inline-flex;
}
.mx-fig > button {
  padding: 0;
  border: 0;
  border-bottom: 1px dotted currentColor;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  cursor: help;
}
.mx-fig-up {
  color: var(--good);
}
.mx-fig-down {
  color: var(--bad);
}
.mx-fig-flat {
  color: var(--fg1);
}
.mx-fig-tip {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 6;
  width: max-content;
  max-width: min(21rem, 78vw);
  box-sizing: border-box;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--bg0);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
  color: var(--fg1);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
}
.mx-fig-open .mx-fig-tip {
  display: block;
}
@media (hover: hover) {
  .mx-fig:hover .mx-fig-tip {
    display: block;
  }
}
/* (in a habit's card the figure is the large number; in a setting's row it runs with the name) */
.mx-gcard-figure .mx-fig > button {
  font-size: 1.5rem;
}
.mx-gset .mx-fig > button {
  font-size: 0.875rem;
}
.mx-gset-of {
  color: var(--fg2);
  font-size: 0.8125rem;
}
.mx-skips .mx-fig > button {
  font-size: 1.0625rem;
}
.mx-skips .mx-fig-tip {
  left: auto;
  right: 0;
}
.mx-gcard-skip .mx-gkind::before {
  background: var(--bad);
}
/* the player's levels, the page's one input: the two side by side on a wide page */
/* the player's levels: a bar that stays at the view's top as it scrolls (every figure follows them), no taller
   than its two fields, the two side by side at every width (a phone: each by its picture alone) */
.mx-guide-you {
  position: sticky;
  top: 0;
  z-index: 6;
  margin: 0 0 1rem;
  padding: 0.1875rem 0.375rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--bg1);
}
/* (stuck to the view's top it is a flat strip from edge to edge with a line under it, no card: its corners showed
   what scrolled behind them. The strip and the line beyond the bar's own box are shadows' spread, each cut to its
   own height: a shadow adds nothing to scroll sideways to) */
.mx-guide-you.mx-stuck {
  border-color: transparent;
  border-radius: 0;
  box-shadow: 0 0 0 100vmax var(--bg1);
  clip-path: inset(0 -100vmax -1px);
}
.mx-guide-you.mx-stuck::after {
  content: '';
  position: absolute;
  inset: auto 0 -1px;
  height: 1px;
  background: var(--line);
  box-shadow: 0 0 0 100vmax var(--line);
  clip-path: inset(0 -100vmax);
  pointer-events: none;
}
.mx-stick-mark {
  height: 0;
}
.mx-guide-you .mx-guide-levels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border: 0;
  background: none;
}
.mx-guide-you .mx-guide-levels .mx-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  min-height: 0;
  padding: 0.25rem 0.5rem;
}
.mx-guide-you .mx-guide-levels .mx-row-icon {
  width: 1.5rem;
  height: 1.5rem;
}
.mx-guide-you .mx-guide-levels .mx-row + .mx-row {
  border-top: 0;
  border-left: 1px solid var(--line-soft);
}
.mx-guide-you .mx-level input {
  padding-block: 0.1875rem;
}
@media (max-width: 34rem) {
  .mx-guide-you .mx-guide-levels .mx-row {
    grid-template-columns: auto auto;
    justify-content: center;
    gap: 0.375rem;
    padding-inline: 0.25rem;
  }
  .mx-guide-you .mx-guide-levels .mx-row-what {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

/* a bounty's rarity stepped on its tile (parts.tsx, RarityStep): a small plus over a small minus, left of its
   two letters. Seldom used, so quiet; the tile's colour says which rarity it is */
.mx-card .mx-rarity-step {
  position: absolute;
  right: 2rem;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.mx-rarity-step button {
  display: grid;
  place-items: center;
  width: 0.9375rem;
  height: 0.9375rem;
  padding: 0;
  border: 0;
  border-radius: 0.1875rem;
  background: none;
  color: var(--fg2);
  font: 700 0.8125rem/1 var(--sans);
  cursor: pointer;
}
.mx-rarity-step button:hover {
  background: var(--bg3);
  color: var(--fg0);
}
.mx-card:has(.mx-rarity-step) .mx-card-main {
  padding-right: 3.0625rem;
}
.mx-card-name {
  overflow-wrap: anywhere;
}
@media (pointer: coarse) {
  .mx-rarity-step button {
    width: 1rem;
    height: 1.125rem;
    font-size: 0.9375rem;
  }
}
/* (a phone's tiles are narrow: the picture and the gaps give the name what room they can) */
@media (max-width: 33.75rem) {
  .mx-narrow-desk .mx-card-main {
    column-gap: 0.375rem;
    padding-left: 0.375rem;
  }
  .mx-narrow-desk .mx-card-main .mx-goods.mx-mid {
    width: 1.75rem;
    height: 1.75rem;
  }
  .mx-narrow-desk .mx-card-name {
    font-size: 0.78125rem;
  }
}

/* the Analysis and Settings buttons, in the bar: each its picture, and its name but on a small screen */
.mx-tool-name {
  display: none;
}
@media (min-width: 40rem) {
  .mx-tool.mx-tool-named {
    display: inline-flex;
    align-items: center;
    width: auto;
    gap: 0.375rem;
    padding: 0 0.625rem;
  }
  .mx-tool-name {
    display: inline;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1;
  }
}
/* (the way back from the Analysis view, above its title) */
/* what a button does, behind a small question mark beside it (parts.tsx, Help): opened by a tap or a click, so it
   is there on a phone too; its words in the page's own dark card */
.mx-help {
  position: relative;
  flex: none;
  display: inline-flex;
}
.mx-help-q {
  display: grid;
  place-items: center;
  width: 1.375rem;
  height: 1.375rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg2);
  color: var(--fg1);
  font: 700 0.75rem/1 var(--sans);
  cursor: pointer;
}
.mx-help-q:hover,
.mx-help-open .mx-help-q {
  border-color: var(--accent);
  color: var(--fg0);
}
.mx-help-tip {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 30;
  width: max-content;
  max-width: min(19rem, 80vw);
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  background: var(--bg0);
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.55);
  color: var(--fg1);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
}
.mx-help-tip b {
  display: block;
  margin-bottom: 0.125rem;
  color: var(--fg0);
  font-weight: 700;
}
.mx-help-up .mx-help-tip {
  top: auto;
  bottom: calc(100% + 1.25rem);
}
.mx-help-open .mx-help-tip {
  display: block;
}
/* (a button and its question mark, side by side) */
.mx-go-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.mx-go-row > .btn {
  flex: 1 1 0;
  min-width: 0;
}
.mx-desk-go > .mx-help {
  margin-left: -0.1875rem;
}
/* (a phone: the words open across the whole row of buttons, whichever mark was tapped) */
@media (max-width: 56.24rem) {
  .mx-narrow-desk .mx-desk-go {
    position: relative;
  }
  .mx-narrow-desk .mx-desk-go > .mx-help {
    position: static;
  }
  .mx-narrow-desk .mx-desk-go > .mx-help .mx-help-tip {
    left: 0;
    right: 0;
    bottom: calc(100% + 0.5rem);
    width: auto;
    max-width: none;
  }
}

/* a part of the view the address names (view.ts): clear of the page's top, and marked for a moment */
/* (and of the levels' bar, which stays at the view's top) */
.mx-gset,
.mx-gcard {
  scroll-margin-top: 4.25rem;
}
.mx-part-shown {
  animation: mx-part-shown 2.4s ease-out;
}
@keyframes mx-part-shown {
  0%,
  45% {
    box-shadow: inset 0 0 0 2px var(--accent);
  }
  100% {
    box-shadow: inset 0 0 0 2px transparent;
  }
}

/* a setting's or a strategy's details (analysis.tsx): the button that opens it, and beneath, why it works, a run
   without it and with it, and its worth by either level */
.mx-dive-open {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  align-self: flex-start;
  margin-top: 0.5rem;
}
.mx-dive-open span {
  display: inline-block;
  transition: transform 0.15s;
}
.mx-dive-is-open span {
  transform: rotate(90deg);
}
.mx-gcard > .mx-dive-open {
  margin-top: auto;
}
.mx-gcard-open {
  grid-column: 1 / -1;
}
.mx-dive {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem 2rem;
  align-items: start;
  padding-top: 0.875rem;
  border-top: 1px solid var(--line-soft);
  color: var(--fg1);
  font-size: 0.875rem;
  line-height: 1.5;
  cursor: default;
}
.mx-gset > .mx-dive {
  grid-column: 1 / -1;
}
.mx-dive-why,
.mx-dive-foot {
  grid-column: 1 / -1;
  max-width: 46rem;
}
.mx-dive-why p,
.mx-dive-foot {
  margin: 0;
}
.mx-dive-foot {
  color: var(--fg2);
  font-size: 0.8125rem;
}
.mx-dive-foot b {
  color: var(--fg0);
}
.mx-dive-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.mx-dive-table th,
.mx-dive-table td {
  padding: 0.375rem 0 0.375rem 0.75rem;
  border-bottom: 1px solid var(--line-soft);
  text-align: right;
  font-weight: 400;
}
.mx-dive-table th:first-child {
  padding-left: 0;
  text-align: left;
}
.mx-dive-table thead th {
  color: var(--fg2);
  font-size: 0.75rem;
  vertical-align: bottom;
}
.mx-dive-table tbody th {
  color: var(--fg1);
}
.mx-dive-table td {
  color: var(--fg1);
}
.mx-dive-table td:last-child {
  color: var(--fg0);
  font-weight: 600;
}
.mx-dive-table tbody tr:last-child th,
.mx-dive-table tbody tr:last-child td {
  border-bottom: 0;
}
.mx-dive-charts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}
/* (how a figure moves with one level: a bar a level studied from the line of no change, the player's own bright) */
.mx-bars {
  min-width: 0;
  margin: 0;
}
.mx-bars figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.25rem;
  margin-bottom: 0.375rem;
  color: var(--fg2);
  font-size: 0.75rem;
}
.mx-bars-plot {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 4rem;
}
.mx-bars-zero {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
  pointer-events: none;
}
.mx-bar {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.mx-bar i {
  position: absolute;
  left: 0;
  right: 0;
  border-radius: 3px 3px 0 0;
  background: var(--good);
  opacity: 0.4;
}
.mx-bar i.mx-bar-under {
  border-radius: 0 0 3px 3px;
}
.mx-bar i.mx-bar-down {
  background: var(--bad);
}
.mx-bar i.mx-bar-flat {
  background: var(--fg2);
}
.mx-bar-at i {
  opacity: 0.75;
}
.mx-bar-mine i {
  opacity: 1;
}
.mx-bar:focus-visible {
  outline: 1px solid var(--accent);
}
.mx-bars-said {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.25rem;
  margin: 0.375rem 0 0;
  color: var(--fg1);
  font-size: 0.8125rem;
}
.mx-bars-said b {
  color: var(--fg0);
}
@media (max-width: 48rem) {
  .mx-dive {
    grid-template-columns: minmax(0, 1fr);
  }
  .mx-bars-plot {
    gap: 1px;
  }
}

/* a setting's question mark, beside its name in its row (parts.tsx, Help with `row`): smaller than a button's, its
   words under the name's line and as wide as it, and under the pointer too where there is one */
.mx-help-row {
  position: static;
}
.mx-help-row .mx-help-q {
  width: 1.125rem;
  height: 1.125rem;
  background: none;
  color: var(--fg2);
  font-size: 0.6875rem;
}
.mx-help-row .mx-help-tip {
  top: calc(100% + 0.125rem);
  left: 0;
  right: auto;
  width: min(21rem, 100%);
  max-width: none;
  cursor: default;
}
.mx-help-tip a {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
@media (hover: hover) {
  .mx-help-row:hover .mx-help-tip {
    display: block;
  }
}
.mx-cal-row {
  position: relative;
}
/* (Advanced, at the settings' foot: its groups named as the others are, a step smaller) */
.mx-more h4 {
  margin: 0.5rem 0 0.375rem;
  color: var(--fg2);
  font-size: 0.75rem;
  font-weight: 700;
}

/* the Analysis view's two kinds, each named with what it is in brackets; beside the first, the way to Settings,
   drawn as the planner's own Settings button with its name */
.mx-guide-kind-sub {
  color: var(--fg1);
  font-weight: 500;
}
.mx-guide-kind p b {
  color: var(--fg0);
  font-weight: 600;
}
/* (the cogwheel beside the heading's "Settings", as the button has it) */
.mx-guide-kind-sub .ic {
  width: 1em;
  height: 1em;
  margin: 0 0.25em 0 0.0625em;
  vertical-align: -0.125em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mx-tool.mx-guide-settings {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  width: auto;
  margin-top: 0.625rem;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
}
/* (a strategy to do: Recommended, in the green the settings' own mark is) */
.mx-gkind-do {
  border-color: color-mix(in oklab, var(--good) 45%, transparent);
  color: var(--good);
}
/* a figure's words (analysis.tsx, Figure): what the part means, then what the figure rests on, then the way to
   its details */
.mx-fig-tip {
  cursor: default;
}
.mx-fig-means,
.mx-fig-basis {
  display: block;
}
.mx-fig-means {
  color: var(--fg0);
}
.mx-fig-basis {
  margin-top: 0.375rem;
  color: var(--fg2);
}
.mx-fig-tip .mx-fig-basis b {
  color: var(--fg0);
  font-size: inherit;
  line-height: inherit;
}
.mx-fig-tip .btn-mini {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

/* Brighter Merchant's own pictures (art.ts; parts.tsx, Art): the bounty board, and pictures made of the game's
   icons. Each is sized by the place it is drawn in (a row's icon, a card's). Two pieces sit side by side, a little
   over one another where the place is a square, the one in play in front; a greyed piece is out of play */
.mx-art-board {
  display: inline-block;
  flex: none;
}
.mx-art-board svg {
  display: block;
  width: 100%;
  height: 100%;
}
.mx-art {
  position: relative;
  display: inline-block;
  flex: none;
}
.mx-art > .mx-art-piece {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.mx-art-piece > .mx-art-pic {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* (read: the game's eye under a piece, the piece whole above it. The picture is taller by the eyes' line) */
.mx-art-eyes {
  --mx-eye: 0.9375rem;
}
.mx-art-eyes > .mx-art-piece > .mx-art-pic {
  height: calc(100% - var(--mx-eye));
}
.mx-art-piece > .mx-art-eye {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: var(--mx-eye);
  height: var(--mx-eye);
  transform: translateX(-50%);
  object-fit: contain;
}
/* (pieces two to a row: the six bounty slots) */
.mx-art-grid {
  /* (the six bounty slots, two to a row, each lapping over the next across and down as cards do, the first on top,
     so the six stand no larger than another picture and each one's edge and seal still show; Joe, 2026-11-18.
     Every size is said outright: WebKit sizes a piece by the picture's own 68 px otherwise. The contract is drawn
     on 0.706 of its square's width, from 0.147 in, and on nearly all its height) */
  --mx-slot: 1rem;
  --mx-step-x: calc(var(--mx-slot) * 0.52);
  --mx-step-y: calc(var(--mx-slot) * 0.53);
  box-sizing: border-box;
}
.mx-art.mx-art-grid > .mx-art-piece {
  --col: 0;
  --row: 0;
  position: absolute;
  left: calc(var(--col) * var(--mx-step-x) - var(--mx-slot) * 0.147);
  top: calc(var(--row) * var(--mx-step-y) - var(--mx-slot) * 0.03);
  z-index: calc(6 - 2 * var(--row) - var(--col));
  width: var(--mx-slot);
  height: var(--mx-slot);
}
.mx-art.mx-art-grid > .mx-art-piece:nth-child(even) {
  --col: 1;
}
.mx-art.mx-art-grid > .mx-art-piece:nth-child(n + 3) {
  --row: 1;
}
.mx-art.mx-art-grid > .mx-art-piece:nth-child(n + 5) {
  --row: 2;
}
/* (a dark edge to the right of each and under it, where it laps: the grid of six read at a glance) */
.mx-art-grid > .mx-art-piece > .mx-art-pic {
  width: var(--mx-slot);
  height: var(--mx-slot);
  filter: drop-shadow(0.75px 0.75px 0 rgba(0, 0, 0, 0.9)) drop-shadow(0.5px 0.5px 1px rgba(0, 0, 0, 0.5));
}
.mx-art-2 > .mx-art-piece {
  top: 16%;
  width: 68%;
  height: 68%;
}
.mx-art-2 > .mx-art-piece:nth-child(2) {
  left: auto;
  right: 0;
}
.mx-art-piece:not(.mx-art-dim) {
  z-index: 1;
}
.mx-art-dim {
  filter: grayscale(1) brightness(0.8);
  opacity: 0.5;
}
/* (a card has the room for the two whole, side by side) */
.mx-gcard header .mx-art-2.mx-gcard-icon {
  width: 3.625rem;
}
.mx-gcard header .mx-art-2 > .mx-art-piece {
  top: 0;
  width: 1.75rem;
  height: 100%;
}
.mx-art-mark {
  position: absolute;
  z-index: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* (never done: a red cross through the picture, or through one piece of it, edged so it reads over the icon) */
.mx-art-x {
  inset: 0;
  width: 100%;
  height: 100%;
  stroke: var(--bad);
  stroke-width: 1.5;
}
.mx-art-x .mx-art-under {
  stroke: var(--bg1);
  stroke-width: 2.6;
  opacity: 0.7;
}
/* (a piece crossed through: the piece greyed, its cross not) */
.mx-art-dim.mx-art-crossed {
  filter: none;
  opacity: 1;
}
.mx-art-dim.mx-art-crossed > .mx-art-pic {
  filter: grayscale(1) brightness(0.9);
  opacity: 0.75;
}
.mx-art-crossed > .mx-art-x {
  top: 0;
  bottom: auto;
  height: 100%;
}
/* (a swap: its two arrows on a disc between the two bounties) */
.mx-art-swap .mx-art-mark {
  left: 50%;
  bottom: -8%;
  width: 48%;
  height: 48%;
  transform: translateX(-50%);
  stroke: var(--fg0);
  stroke-width: 2.2;
}
.mx-art-swap .mx-art-mark circle {
  fill: var(--bg0);
  stroke: var(--line);
  stroke-width: 1;
}

/* (a choice named with the game's icons: each icon before its own word) */
.mx-unit button,
.mx-picks button {
  display: inline-flex;
  align-items: center;
  white-space: pre;
}
.mx-unit .mx-glyph {
  width: 1rem;
  height: 1rem;
}

/* the Analysis view's head: the brain its button has, its name, and the day it last ran; then, under the levels,
   what the analysis is and what it rests on */
.mx-guide-head h1 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.mx-guide-head h1 .ic {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mx-guide-date {
  margin-left: 0.25rem;
  color: var(--fg2);
  font-size: 0.8125rem;
  font-weight: 500;
}
.mx-guide-what {
  margin-top: 1.25rem;
}
/* (a small title: most players go straight to the figures, and what it says is all in its details) */
.mx-guide-what h2 {
  margin: 0 0 0.25rem;
  color: var(--fg1);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
}
.mx-guide-how p {
  margin: 0 0 0.625rem;
}
.mx-guide-how ul {
  margin: 0;
  padding-left: 1.125rem;
}
.mx-gtile b {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.25rem;
}

/* a quest's setting the player's levels do not reach (parts.tsx, analysis.tsx): what it needs, in the place its
   Recommended would be */
.mx-rec-need {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.25rem;
  padding: 0.0625rem 0.4375rem;
  border: 1px solid color-mix(in oklab, var(--warn) 45%, transparent);
  border-radius: 1rem;
  color: var(--warn);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.3;
}
.mx-rec-need span {
  display: inline-flex;
  align-items: center;
  gap: 0 0.25rem;
}

/* (the layout glyph turned about: the side panel on the right) */
.mx-turned {
  transform: rotate(180deg);
}

/* (a switch that cannot be turned: a quest's setting the player's levels do not reach) */
.mx-row input[role='switch']:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
label.mx-row:has(input[role='switch']:disabled) {
  cursor: default;
}

/* the baseline (analysis.tsx): what every strategy is measured against, said once in a box at the head of the
   Manual kind; the word wears the box's colour wherever it is used, so a figure against it points back there */
.mx-guide {
  --mx-base: #4fd1c5;
}
.mx-base {
  color: var(--mx-base);
  font-weight: 700;
}
/* (the baseline itself, the first of the strategies: the row on the baseline's own ground, its figure in the
   words' brighter ink) */
.mx-rows.mx-gsets-base {
  margin-bottom: 0.75rem;
  border: 1px solid color-mix(in oklab, var(--mx-base) 45%, transparent);
  border-left: 3px solid var(--mx-base);
  background: color-mix(in oklab, var(--mx-base) 8%, var(--bg2));
}
.mx-gset.mx-gset-base .mx-row-what small b {
  display: inline;
  color: var(--fg0);
  font-weight: 600;
}
.mx-gset.mx-gset-base .mx-row-what small .mx-base {
  color: var(--mx-base);
  font-weight: 700;
}
/* (in a figure's line and its tip the word keeps the line's size) */
.mx-gcard .mx-gcard-figure .mx-base,
.mx-fig-tip .mx-fig-basis .mx-base {
  color: var(--mx-base);
  font-size: inherit;
  line-height: inherit;
}

/* the bar's tool buttons: each icon in its button's middle (an icon set in a line of text sits above it) */
.mx-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* the Analysis view's parts, settings and strategies alike (analysis.tsx, Part): one row's shape for both, the
   picture's place wide enough for two side by side */
.mx-gset {
  grid-template-columns: 3.5rem minmax(0, 1fr);
}
/* (a part's picture and, under it, a setting's mark: whether it is as recommended) */
.mx-gset-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  align-self: start;
}
.mx-rec-badge {
  position: relative;
  display: inline-flex;
}
.mx-rec-badge > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 1.5px solid;
  border-radius: 50%;
  cursor: pointer;
}
.mx-rec-badge > button svg {
  width: 0.9375rem;
  height: 0.9375rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mx-rec-on > button {
  border-color: color-mix(in oklab, var(--good) 55%, transparent);
  background: color-mix(in oklab, var(--good) 12%, transparent);
  color: var(--good);
}
.mx-rec-off > button {
  border-color: color-mix(in oklab, var(--warn) 60%, transparent);
  background: color-mix(in oklab, var(--warn) 14%, transparent);
  color: var(--warn);
}
.mx-rec-off > button svg {
  stroke-width: 2;
}
/* (its words open under it and run to the right, into the page; no gap between, so the pointer can reach Apply) */
.mx-rec-tip {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 6;
  padding-top: 0.25rem;
}
.mx-rec-tip > span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3125rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--bg0);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
  color: var(--fg1);
  font-size: 0.75rem;
  line-height: 1.3;
  white-space: nowrap;
}
.mx-rec-tip b {
  color: var(--fg0);
}
.mx-rec-tip .btn-mini {
  margin-left: 0.25rem;
}
.mx-rec-open .mx-rec-tip {
  display: block;
}
/* (beside a setting's name, in Settings: smaller, and its words open under the name's line from its start, so they
   stay inside a narrow page wherever on the line the badge is) */
.mx-row-title .mx-rec-badge {
  position: static;
}
.mx-row-title .mx-rec-badge > button {
  width: 1.25rem;
  height: 1.25rem;
}
.mx-row-title .mx-rec-badge > button svg {
  width: 0.75rem;
  height: 0.75rem;
}
@media (hover: hover) {
  .mx-rec-badge:hover .mx-rec-tip {
    display: block;
  }
}
/* (each picture over its mark, in the column's middle) */
.mx-gset-side > .mx-row-icon {
  align-self: center;
}
.mx-gset-side > .mx-art-2.mx-row-icon {
  width: 3.5rem;
  height: 2rem;
}
.mx-gset-side > .mx-art-2 > .mx-art-piece {
  top: 0;
  width: 1.625rem;
  height: 100%;
}
.mx-gset-side > .mx-art-2.mx-art-eyes.mx-row-icon {
  height: calc(2rem + var(--mx-eye));
}
.mx-gset-side > .mx-art-swap .mx-art-mark {
  bottom: -18%;
  width: 34%;
  height: 60%;
}
@media (max-width: 48rem) {
  .mx-gset {
    grid-template-columns: 2.75rem minmax(0, 1fr);
  }
  .mx-gset-side > .mx-art-2.mx-row-icon {
    width: 2.75rem;
    height: 1.75rem;
  }
  .mx-gset-side > .mx-art-2 > .mx-art-piece {
    width: 1.3125rem;
  }
  .mx-gset-side > .mx-art-2.mx-art-eyes.mx-row-icon {
    height: calc(1.75rem + var(--mx-eye));
  }
}
/* (the view's name and the day it last ran, on one line of text) */
.mx-guide-name {
  display: inline-flex;
  align-items: baseline;
  gap: 0.625rem;
}
.mx-guide-name .mx-guide-date {
  margin-left: 0;
}
/* (how the analysis was made: folded away under its tiles) */
.mx-guide-what > .mx-dive-open {
  margin-top: 0.625rem;
}
.mx-guide-how {
  margin: 0.625rem 0 0;
  padding: 0.75rem 1rem 0.75rem 2rem;
  border: 1px solid var(--line-soft);
  border-radius: 0.75rem;
  color: var(--fg1);
  font-size: 0.875rem;
  line-height: 1.5;
}
.mx-guide-how li + li {
  margin-top: 0.375rem;
}

/* (the word in a row's line: on the line, in its colour, whatever a row's bold is) */
.mx-row-what .mx-gset-of .mx-base {
  display: inline;
  color: var(--mx-base);
  font-weight: 700;
}
/* (the six slots, where a row has the height for them) */
.mx-row > .mx-art-grid.mx-row-icon,
.mx-gset-side > .mx-art-grid.mx-row-icon {
  width: calc(var(--mx-step-x) + var(--mx-slot) * 0.706);
  height: calc(2 * var(--mx-step-y) + var(--mx-slot) * 0.94);
  padding: 0;
}

/* something folded away (analysis.tsx, Fold): a triangle that turns down when it is open, its name, and a line
   across to the edge. The one way the page draws anything that opens */
.mx-fold {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.25rem 0;
  border: 0;
  background: none;
  color: var(--fg1);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.mx-fold::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.mx-fold:hover {
  color: var(--fg0);
}
.mx-fold-mark {
  display: inline-block;
  font-size: 0.625rem;
  line-height: 1;
  transition: transform 0.15s;
}
.mx-fold-open .mx-fold-mark {
  transform: rotate(90deg);
}
/* (what it opens sits under its line: no line of its own) */
.mx-dive {
  padding-top: 0.5rem;
  border-top: 0;
}
.mx-guide-how {
  margin-top: 0.375rem;
  border: 0;
  padding: 0;
}

/* Analysis shown (Merchant.tsx, .mx-analysis): the bar runs across the page's top, and the settings, opened from
   it or from the view, come in from the right over the view, a column wide */
.mx-analysis > .mx-head {
  grid-column: 1 / -1;
  border-right: none;
  /* (over the view, so that its buttons' names, which open under them, are whole) */
  position: relative;
  z-index: 31;
}
/* (the map is under the view and would lie over the bar's end: put away while the view is shown, as it is where
   the bounties have the page; and the bar is there though the map alone had the page, which has none) */
.mx-analysis > .mx-map,
.mx-analysis > .mx-edge {
  display: none;
}
.mx.mx-analysis.mx-panel-closed > .mx-head,
.mx.mx-analysis.mx-panel-closed > .mx-sheet {
  display: flex;
}

/* the Analysis view's two kinds, the heart of it, each a panel of its own colour (Joe, 2026-11-18): Automatic in the
   site's blue, what Brighter Merchant sets; Manual in the tool's own red, what the player does in the game */
/* (a kind of strategy is a section of the page, not a card: a rule of its colour over its name sets it apart, and
   its rows have the page's whole width) */
.mx-kind {
  margin-top: 2.25rem;
  padding: 0.875rem 0 0;
  border-top: 3px solid var(--mx-kind);
}
.mx-kind-auto {
  --mx-kind: var(--accent);
}
/* (the tool's own red, the stall's, lightened a little so that the word reads on the dark page) */
.mx-kind-manual {
  --mx-kind: color-mix(in oklab, var(--merchant) 82%, #fff);
}
/* (the most the simulation earned: gold, a prize few reach) */
.mx-kind-top {
  --mx-kind: #e2b93b;
}
.mx-kind-top .mx-guide-top {
  padding-left: 1rem;
}
.mx-guide-top ul {
  margin: 0 0 0.75rem;
  padding-left: 1.125rem;
}
.mx-top-figure {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.375rem 0.5rem;
  color: var(--fg1);
}
.mx-top-figure > b:first-child {
  color: var(--fg0);
  font-size: 1.375rem;
  line-height: 1.2;
}
.mx-top-figure .mx-fig-up {
  color: #4ade80;
  font-weight: 700;
}
.mx-guide-how p.mx-top-warn {
  padding: 0.5rem 0.75rem;
  border-left: 3px solid var(--mx-kind);
  border-radius: 0.375rem;
  background: color-mix(in oklab, var(--mx-kind) 9%, transparent);
  color: var(--fg0);
}
.mx-guide-how p.mx-top-note {
  margin-bottom: 0;
  color: var(--fg2);
  font-size: 0.8125rem;
}
.mx-kind > .mx-guide-kind {
  margin-top: 0;
}
.mx-kind-word {
  color: var(--mx-kind);
}
.mx-kind > .mx-gsets:last-child {
  margin-bottom: 0;
}

/* spare goods ("Buy spare goods", spares.ts): what a stop says of them, in a colour of their own (not the run's
   buying and selling), and the lots lying on the ground with the time each has left */
.mx {
  --mx-spare: #b794f4;
}
.mx-act-spare .mx-act-word {
  min-width: 4.5rem;
  color: var(--mx-spare);
  background: color-mix(in oklab, var(--mx-spare) 16%, transparent);
}
/* (a spare lot's name is read whole, over two lines where the row is narrow: it is new to the player) */
.mx-act-spare .mx-act-name {
  white-space: normal;
  overflow: visible;
  line-height: 1.2;
}
.mx-act-item .mx-act-skip,
.mx-spare .mx-x {
  position: static;
  flex: none;
  width: 1.375rem;
  height: 1.375rem;
  font-size: 0.875rem;
}
.mx-stop-body > .mx-acts {
  margin: 0.25rem 0;
}
.mx-wait-note {
  margin: 0.5rem 0 0;
  padding: 0.4375rem 0.625rem;
  border: 1px solid color-mix(in oklab, var(--warn) 45%, transparent);
  border-radius: 0.5rem;
  background: color-mix(in oklab, var(--warn) 9%, transparent);
  color: var(--fg0);
  font-size: 0.8125rem;
  line-height: 1.4;
}
.mx-spares {
  margin: 0.75rem 0 0;
  padding: 0.625rem 0.75rem 0.75rem;
  border: 1px solid color-mix(in oklab, var(--mx-spare) 35%, var(--line));
  border-radius: 0.625rem;
  background: color-mix(in oklab, var(--mx-spare) 5%, transparent);
}
.mx-spares h3 {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--mx-spare);
}
.mx-spares h3 small {
  margin-left: 0.25rem;
  color: var(--fg1);
  font-size: 0.75rem;
  font-weight: 500;
}
.mx-spares h3 .mx-link {
  margin-left: auto;
}
.mx-spare-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.mx-spare {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
  padding: 0.25rem 0.375rem 0.25rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--bg2);
  font-size: 0.8125rem;
}
.mx-spare-name {
  min-width: 0;
  display: flex;
  flex-direction: column;
  font-weight: 600;
  line-height: 1.2;
}
.mx-spare-name small {
  color: var(--fg2);
  font-size: 0.6875rem;
  font-weight: 500;
}
.mx-spare-left {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--fg1);
}
.mx-spare-soon {
  border-color: color-mix(in oklab, var(--warn) 60%, transparent);
}
.mx-spare-soon .mx-spare-left {
  color: var(--warn);
}
.mx-spare-again {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg3);
  color: var(--fg0);
  cursor: pointer;
}
.mx-spare-again svg {
  width: 0.875rem;
  height: 0.875rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mx-spare-again:hover {
  border-color: var(--mx-spare);
  color: var(--mx-spare);
}
/* (the wide bounties page: the lots across it, under the two grids) */
.mx-desk-spares {
  grid-column: 1 / -1;
  grid-row: 3;
  padding: 0 1.25rem;
}
.mx-desk-spares > .mx-spares {
  margin: 0 0 0.75rem;
}
.mx-desk-spares > .mx-wait-note {
  margin: 0 0 0.75rem;
}
@media (max-width: 56.24rem) {
  .mx-desk-spares {
    padding: 0 0.875rem;
  }
}

/* (a run with spare goods: what they are, in a line over its stops, its question mark at the line's end) */
.mx-spare-note {
  position: relative;
  margin: 0.5rem 0 0.25rem;
  padding: 0.4375rem 0.625rem;
  border: 1px solid color-mix(in oklab, var(--mx-spare) 35%, var(--line));
  border-radius: 0.5rem;
  background: color-mix(in oklab, var(--mx-spare) 6%, transparent);
  color: var(--fg1);
  font-size: 0.8125rem;
  line-height: 1.4;
}
.mx-spare-note b {
  color: var(--mx-spare);
}
.mx-spare-note .mx-help {
  margin-left: 0.25rem;
  vertical-align: middle;
}
/* (a stop with spare goods has more to say than fits beside its Done: the button goes under, at the stop's end) */
.mx-step-next .mx-stop:has(.mx-act-spare) {
  flex-wrap: wrap;
}
.mx-step-next .mx-stop:has(.mx-act-spare) > .mx-stop-body {
  flex: 1 1 12rem;
}
.mx-step-next .mx-stop:has(.mx-act-spare) > .mx-tick {
  margin-left: auto;
}
/* (a strategy a setting already does for the player: the row greyed, its figure given way to where the setting is) */
.mx-gset-done > .mx-gset-side,
.mx-gset-done .mx-row-title > b,
.mx-gset-done small {
  opacity: 0.5;
}
.mx-gset-is > * {
  display: inline-flex;
  align-items: center;
  padding: 0.0625rem 0.4375rem;
  border: 1px solid color-mix(in oklab, var(--accent) 45%, transparent);
  border-radius: 1rem;
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
/* (a setting's figure for each way of playing, side by side under what it is: a line of its own) */
.mx-gset-split {
  display: block;
  margin-top: 0.25rem;
}
.mx-gset .mx-row-what small .mx-gset-split b {
  display: inline;
  color: var(--fg0);
  font-weight: 600;
}
/* (the reasons under a figure: a short list, each on its own line with a mark) */
.mx-gset-why {
  display: grid;
  gap: 0.1875rem;
  margin-top: 0.25rem;
}
.mx-gset-why > span {
  position: relative;
  padding-left: 0.875rem;
}
.mx-gset-why > span::before {
  content: '';
  position: absolute;
  left: 0.125rem;
  top: 0.55em;
  width: 0.3125rem;
  height: 0.3125rem;
  border-radius: 50%;
  background: var(--fg2);
}
.mx-gset-of i {
  font-style: italic;
}
/* (Analysis shown: the view and the bar over it are layered among themselves only, so the site's own bar and what
   drops from it, the tool switcher's list, stay over both) */
.mx-analysis {
  isolation: isolate;
}
/* (a spare lot still in the pack, on the shelf: said apart from those on the ground; one a bounty of the run is run
   with in the spare goods' own colour, one to put down marked as something to do) */
.mx-spare-pack {
  border-style: dashed;
}
.mx-spare-use {
  border-color: color-mix(in oklab, var(--mx-spare) 55%, transparent);
}
.mx-spare-put .mx-spare-name small {
  color: var(--mx-spare);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mx-first > .mx-acts + .mx-acts {
  margin-top: 0.25rem;
}
/* the run's start on the map (route-map.ts): a flag over the board it sets off from, so the route is seen to begin
   at a board and not at its first shop */
.mx-start {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 5;
}
.mx-start > span {
  position: absolute;
  left: 0;
  bottom: 1.125rem;
  transform: translateX(-50%);
  padding: 0.125rem 0.4375rem;
  border-radius: 0.375rem;
  background: #4da3ff;
  color: #06121f;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 0 0 2px rgba(8, 10, 14, 0.78);
}
.mx-start > span::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  margin-left: -0.25rem;
  border: 0.25rem solid transparent;
  border-top-color: #4da3ff;
}
/* (the run's start said over its stops while the player is still at the board) */
.mx-start-line {
  margin: 0.375rem 0 0.25rem;
  color: var(--fg1);
  font-size: 0.8125rem;
}
.mx-start-line b {
  display: inline-block;
  margin-right: 0.25rem;
  padding: 0.0625rem 0.375rem;
  border-radius: 0.375rem;
  background: #4da3ff;
  color: #06121f;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
/* (a den's or a shortcut's Detective level, at its card's right end, all in a line down the list; a shortcut's
   seconds in brackets after its name; both quieter than the name, never broken) */
.mx-chip-secs {
  color: var(--fg2);
  font-size: 0.75rem;
  white-space: nowrap;
}
.mx-chip-need {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  color: var(--fg2);
  font-size: 0.75rem;
  white-space: nowrap;
}
.mx-chip-need .mx-glyph {
  width: 0.875rem;
  height: 0.875rem;
  margin: 0 0.125rem;
}

/* ---- a phone's route and bounties, roomier (Joe, 2026-11-18: squashed things and wrapped names) */
@media (max-width: 56.24rem) {
  /* the stop to do now: its goods across the card's whole width, its Done under them as wide as the card (beside
     them the names broke over three lines and ran under the button) */
  .mx-step-next .mx-stop {
    flex-wrap: wrap;
    row-gap: 0.625rem;
  }
  .mx-step-next .mx-stop > .mx-stop-body {
    flex: 1 1 0;
  }
  .mx-step-next .mx-stop > .mx-tick,
  .mx-step-next .mx-stop:has(.mx-act-spare) > .mx-tick {
    flex: 1 1 100%;
    margin-left: 0;
    justify-content: center;
  }
  /* (a stop's goods are named whole, over two lines before they are cut short) */
  .mx-act-name {
    white-space: normal;
    overflow: visible;
    line-height: 1.2;
  }
}
/* (a finger types no letters for a bounty: its two letters give their room to its name) */
@media (pointer: coarse) {
  .mx-card .mx-code {
    display: none;
  }
  /* (a finger's rarity steps: the card's whole right edge, a button the half of it each, set apart from the card's
     own tap by a line, so that a rarity is not changed by dropping the bounty) */
  .mx-card:has(.mx-rarity-step) {
    min-height: 3.25rem;
  }
  .mx-card .mx-rarity-step {
    top: 0;
    right: 0;
    bottom: 0;
    width: 2.5rem;
    transform: none;
    gap: 0;
    border-left: 1px solid var(--line);
  }
  .mx-card .mx-rarity-step button {
    flex: 1;
    width: 100%;
    height: auto;
    border-radius: 0;
    font-size: 1.125rem;
    touch-action: manipulation;
  }
  .mx-card .mx-rarity-step button + button {
    border-top: 1px solid var(--line);
  }
  .mx-card-main {
    padding-right: 0.5rem;
  }
  .mx-card:has(.mx-rarity-step) .mx-card-main {
    padding-right: 2.75rem;
  }
  /* (a name breaks between its words, and inside one only where the word alone is too long) */
  .mx-card-name {
    overflow-wrap: break-word;
  }
}

/* the dialog that asks before one of the two advanced settings is turned on (expert.ts) */
.mx-expert {
  max-width: 26rem;
}
.mx-expert-body p {
  margin: 0 0 0.625rem;
  color: var(--fg1);
  font-size: 0.9375rem;
  line-height: 1.45;
}
.mx-expert-body p:last-child {
  margin-bottom: 0;
}
.mx-expert-body b {
  color: var(--fg0);
}
/* (its two buttons together at its end, each wide enough to press; a phone: the two across its width) */
.mx-expert .modal-actions {
  justify-content: flex-end;
  gap: 0.625rem;
  margin-top: 1rem;
}
.mx-expert .modal-actions .btn {
  min-width: 6.5rem;
  min-height: 2.5rem;
  justify-content: center;
  font-weight: 700;
}
@media (max-width: 30rem) {
  .mx-expert .modal-actions .btn {
    flex: 1 1 0;
  }
}
/* the mark of the two advanced settings, beside their names in Settings and in Analysis */
.mx-adv {
  flex: none;
  padding: 0.0625rem 0.4375rem;
  border: 1px solid color-mix(in oklab, var(--mx-spare, #b794f4) 50%, transparent);
  border-radius: 1rem;
  color: var(--mx-spare, #b794f4);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
/* (why bounties are left while spare goods are held: quieter than the wait's note) */
.mx-rated-note {
  border-color: var(--line);
  background: none;
  color: var(--fg1);
}
.mx-row-marks {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
}
.mx-desk-foot .mx-wait-note {
  margin: 0 0 0.5rem;
}

/* ---- bounties entered from a grid of pictures (parts.tsx, GoodsGrid): the switch between it and typing, and the
   grid itself, a sheet over the page's foot with the boards in reach above it */
.mx-entry {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 2rem;
}
.mx-entry-label {
  color: var(--fg1);
  font-size: 0.8125rem;
  font-weight: 600;
}
.mx-entry-switch {
  margin-left: 0;
  flex: none;
}
.mx-entry-switch button {
  gap: 0.3125rem;
  padding: 0.1875rem 0.625rem;
}
.mx-entry-switch svg.ic {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* (over both of the desk's grids; in the panel, over its lists) */
.mx-desk-top {
  grid-column: 1 / -1;
  padding: 0.625rem 1.25rem 0;
}
.mx-desk-top .mx-desk-note {
  margin: 0.5rem 0 0;
}
.mx-narrow-desk .mx-desk-top {
  padding: 0.625rem 0.875rem 0;
}
.mx-panel > .mx-entry,
.mx-body > .mx-entry {
  padding: 0.5rem 0.875rem 0;
}
/* (the place the grid's next bounty goes to) */
.mx-card-next,
.mx-card-next:hover {
  border-style: solid;
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  color: var(--accent);
}
.mx-pickgrid {
  position: fixed;
  z-index: 40;
  left: 0;
  right: 0;
  bottom: 0;
  box-sizing: border-box;
  width: min(100%, 46rem);
  max-height: min(52vh, 26rem);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0.5rem max(0.625rem, env(safe-area-inset-right, 0px)) calc(0.625rem + env(safe-area-inset-bottom, 0px))
    max(0.625rem, env(safe-area-inset-left, 0px));
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 0.875rem 0.875rem 0 0;
  background: var(--bg1);
  box-shadow: 0 -0.75rem 2rem rgb(0 0 0 / 0.55);
}
.mx-pickgrid-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2rem;
  padding: 0 0.125rem 0.375rem 0.25rem;
  font-size: 0.875rem;
}
.mx-pickgrid-head small {
  color: var(--fg1);
  font-size: 0.8125rem;
}
.mx-pickgrid-head .mx-pickgrid-done {
  margin-left: auto;
  min-width: 4.5rem;
  padding: 0.3125rem 0.875rem;
  font-size: 0.8125rem;
}
.mx-pickgrid-goods {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(2.5rem, 1fr));
  gap: 0.3125rem;
  padding: 0.125rem;
}
.mx-pick {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0.1875rem;
  border: 1.5px solid var(--line);
  border-radius: 0.5rem;
  background: var(--bg2);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.mx-pick .mx-goods {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.mx-pick:hover {
  border-color: var(--accent-dim);
}
.mx-pick:active {
  transform: scale(0.94);
}
.mx-pick-on {
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 14%, var(--bg2));
}
.mx-pick-n {
  position: absolute;
  top: -0.3125rem;
  right: -0.3125rem;
  min-width: 1.25rem;
  padding: 0 0.25rem;
  box-sizing: border-box;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  height: 1.125rem;
  font: 800 0.6875rem/1 var(--sans);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
/* (the next bounty's rarity, chosen before its tap: each in the game's colours for it) */
.mx-pickgrid-rarity {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  padding: 0 0.25rem 0.5rem;
}
.mx-pick-rarity {
  padding: 0.25rem 0.625rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--bg2);
  color: var(--fg1);
  font: 700 0.75rem/1 var(--sans);
  cursor: pointer;
  touch-action: manipulation;
}
.mx-pick-rare {
  border-color: color-mix(in oklab, var(--rim) 45%, transparent);
  color: var(--rim);
}
.mx-pick-rarity[aria-pressed='true'] {
  border-color: var(--rim, var(--fg0));
  background: var(--face, var(--bg3));
  color: var(--rim, var(--fg0));
  box-shadow: 0 0 0 1px var(--rim, var(--fg0));
}
/* (the page makes room: what is entered scrolls clear of the sheet) */
.mx-gridding .mx-desk-grid {
  scroll-margin-bottom: calc(var(--mx-pick-h, 0px) + 0.75rem);
  scroll-margin-top: 3rem;
}
.mx-gridding.mx-narrow-desk .mx-desk {
  padding-bottom: var(--mx-pick-h, 0px);
}
/* (on a phone the run's foot would stand over the board being entered: it waits until the grid is put away, as it
   does while a bounty is typed) */
.mx-gridding.mx-narrow-desk:not(.mx-gridding-near) .mx-desk-foot {
  display: none;
}
/* (where the page has the room the sheet is straight under the grid being entered, a card of its own: its place is
   set by GoodsGrid) */
.mx-pickgrid-near {
  right: auto;
  bottom: auto;
  max-height: none;
  margin: 0;
  padding: 0.5rem 0.625rem 0.625rem;
  border-bottom: 1px solid var(--line);
  border-radius: 0.875rem;
  box-shadow: 0 0.75rem 2rem rgb(0 0 0 / 0.6);
}

/* ---- Analysis or Settings shown from the bar: the page is its button's. The rest of the bar stands back, blurred
   and out of reach, and the pressed button points down at the page with a small triangle */
.mx-head-held > :not(.mx-head-buttons),
.mx-head-held .mx-head-buttons > :not(#merchant-analysis-open):not(#merchant-settings) {
  filter: blur(2px);
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}
.mx-head-held .mx-tool.active::after {
  content: '';
  position: absolute;
  left: 50%;
  top: calc(100% + 0.125rem);
  width: 0;
  height: 0;
  margin-left: -0.4375rem;
  border: 0.4375rem solid transparent;
  border-top-width: 0.375rem;
  border-bottom: 0;
  border-top-color: var(--accent);
  pointer-events: none;
}
/* (Settings is a page of its own, as Analysis is: across the page under the bar, its rows in a column down the
   middle, the same head) */
.mx > .mx-sheet.mx-sheet-page {
  grid-column: 1 / -1;
  justify-self: stretch;
  width: auto;
  z-index: 30;
  border: 0;
  background: var(--bg0);
}
.mx-sheet-page > .mx-scroll {
  box-sizing: border-box;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 1.25rem max(1rem, env(safe-area-inset-right, 0px)) 3rem max(1rem, env(safe-area-inset-left, 0px));
}
/* (the page itself scrolls, edge to edge, not its column) */
.mx > .mx-sheet.mx-sheet-page {
  display: block;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mx-sheet-page > .mx-scroll {
  flex: none;
  overflow: visible;
}
/* (the pressed button's own tip would lie over its page's top) */
.mx-head-held .mx-tool.active > .mx-tip {
  display: none;
}
/* (on a phone a run has its own tab, Route: the Bounties tab says nothing of it while one is under way) */
.mx-narrow-desk .mx-desk-foot.mx-desk-foot-run {
  display: none;
}
/* (Analysis and Settings are never wider than the screen: nothing in them makes the page scroll sideways) */
.mx-guide,
.mx > .mx-sheet.mx-sheet-page {
  overflow-x: hidden;
}
