/* Gathering (gather.js): the marker over a fishing spot or a rock, and the line that floats up at each result.
   Everything here is under #gatherMarks, .gather-mark or .float.gather, so it collides with nothing in lab.css.
   The marker is a solid dark plate with a pale edge, so it reads on any floor. A state is always a shape or a word as
   well as a look: casts and swings left are filled pips beside hollow ones, and why a node cannot be worked is written out. */
#gatherMarks { position: absolute; inset: 0; pointer-events: none; }
#gatherMarks[hidden] { display: none; }
.gather-mark {
  position: absolute; transform: translate(-50%, -100%); pointer-events: auto;
  display: grid; justify-items: center; align-content: center; gap: 3px;
  min-width: 48px; min-height: 44px; padding: 4px 8px 5px;
  border: 1px solid #a8956c; border-radius: 6px; background: #17140f; color: #f2ead8;
  box-shadow: 0 0 0 1px #000, 0 2px 6px rgba(0, 0, 0, 0.6);
  font: inherit; font-size: calc(13px * var(--ts, 1)); line-height: 1.1; white-space: nowrap;
  cursor: pointer; touch-action: manipulation;
}
.gather-mark:focus-visible { outline: 2px solid #f0c27a; outline-offset: 2px; }
.gather-mark .gm-row { display: flex; align-items: center; gap: 5px; }
.gather-mark svg { width: 20px; height: 20px; flex: none; }
.gather-mark b { font-size: calc(15px * var(--ts, 1)); font-weight: 700; }
.gather-mark .gm-pips { display: flex; gap: 3px; }
.gather-mark .gm-pips i { box-sizing: border-box; width: 12px; height: 7px; border: 1px solid #f2ead8; }
.gather-mark .gm-pips i.on { background: #f2ead8; }
.gather-mark .gm-note { font-size: calc(12px * var(--ts, 1)); font-weight: 700; }
.gather-mark.active { border-width: 2px; border-color: #f2ead8; }

.float.gather {
  font-size: calc(15px * var(--ts, 1)); white-space: nowrap; animation-duration: 1.8s;
  text-shadow: 0 0 2px #000, 0 0 4px #000, 0 1px 3px #000;
}
.float.gather.gain { color: #f6ecc9; }
.float.gather.miss { color: #d5e0e8; font-size: calc(14px * var(--ts, 1)); }

/* ---------------- the tool bench, a station of the forge screen (forge-screen.js) ---------------- */
.camp-screen .fg-toolpic { display: inline-grid; place-items: center; width: calc(40px * var(--ts, 1)); height: calc(36px * var(--ts, 1)); color: #cbbf9f; }
.camp-screen .fg-toolpic img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.camp-screen .fg-toolpic svg { width: 30px; height: 30px; }
.camp-screen .fg-toolpic [hidden] { display: none; }
.camp-screen .fg-tool.owned { box-shadow: inset 0 0 0 2px var(--brass); }
.camp-screen .fg-tool .fg-make { margin-top: 8px; min-height: 44px; justify-self: start; }
/* On touch the left half of the screen is the move stick's: a marker there lets the thumb through to it. */
.gather-mark.pass { pointer-events: none; }

/* ---------------- the toolbelt (toolbelt.js): a strip on the cluster's status row in a descent, and a list on the Gear screen ----------------
   In a descent only the tools owned are drawn, small, after the belt's own button (a belt with its buckle), whose
   card lists all seven with what each costs and asks. A tool's state is a shape and a word as well as a look: the
   one in use has a heavy edge and a notch over it, and each picture's name says which. With no tool owned the belt
   is not drawn at all. */
.tool-belt { position: relative; display: flex; align-items: flex-end; gap: 3px; pointer-events: auto; }
.tool-belt[hidden] { display: none; }
.tool-belt .tb-row { display: flex; gap: 3px; }
.tool-belt .tb-slot, .tool-belt .tb-all {
  position: relative; flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 2px; box-sizing: border-box;
  border: 1px solid #a8956c; border-radius: 5px; background: #6b6048; color: #f2ead8; font: inherit; cursor: pointer; touch-action: manipulation;
}
.tool-belt .tb-all { width: 22px; padding: 0; border-color: #6b5d44; background: #1d1a14; color: #cdbf9e; }
.tool-belt .tb-all svg { width: 18px; height: 18px; }
.tool-belt .tb-all[aria-expanded="true"] { border-color: #f2ead8; color: #f2ead8; }
.tool-belt .tb-slot img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.tool-belt .tb-slot svg { width: 70%; height: 70%; }
.tool-belt [hidden] { display: none; }
.tool-belt .tb-slot.wait img, .tool-belt .tb-slot.wait svg { opacity: 0.65; }
.tool-belt .tb-slot.on { border: 3px solid #f2ead8; padding: 0; }
.tool-belt .tb-slot.on::after { content: ""; position: absolute; left: 50%; top: -8px; width: 8px; height: 8px; margin-left: -4px; transform: rotate(45deg); background: #f2ead8; border: 1px solid #000; }
.tool-belt .tb-slot:focus-visible, .tool-belt .tb-all:focus-visible, .tool-belt .tb-fold:focus-visible { outline: 2px solid #f0c27a; outline-offset: 2px; }
/* One tool's words, and the card of every tool: over the belt, never under the bar. */
.tool-belt .tb-tip, .tool-belt .tb-card {
  position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); z-index: 9; margin: 0; padding: 6px 10px; width: max-content; max-width: min(320px, calc(100vw - 16px));
  border: 1px solid #000; border-radius: 6px; background: #17140f; color: #f2ead8; font-size: calc(13px * var(--ts, 1)); line-height: 1.3; text-align: left; pointer-events: none; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.tool-belt .tb-card { padding: 8px 10px; }
.tool-belt .tb-card-name { color: #f0c27a; }
.tool-belt .tb-card ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 5px; }
.tool-belt .tb-card li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; align-items: center; }
.tool-belt .tb-card .tb-pic { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid #a8956c; border-radius: 4px; background: #6b6048; }
.tool-belt .tb-card .tb-pic img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.tool-belt .tb-card .tb-pic svg { width: 18px; height: 18px; }
.tool-belt .tb-card li.none .tb-pic { border-style: dashed; border-color: #7d7461; background: #2a251c; }
.tool-belt .tb-card li.none .tb-pic img, .tool-belt .tb-card li.none .tb-pic svg { opacity: 0.55; filter: grayscale(1) brightness(1.5); }
.tool-belt .tb-card li.on .tb-pic { border: 2px solid #f2ead8; }
.tool-belt .tb-card .tb-state { color: #cdbf9e; }
.tool-belt .tb-card small { color: #cdbf9e; }
/* On touch the belt is one button a thumb high, at the top left with the status row: the belt's picture and how many
   tools are owned, or the tool in use while one is. Its card opens under it. */
.tool-belt .tb-fold { display: inline-flex; align-items: center; gap: 3px; min-width: 44px; min-height: 44px; padding: 4px 8px; border: 1px solid #a8956c; border-radius: 8px; background: #17140f; color: #f2ead8; font: inherit; touch-action: manipulation; }
.tool-belt .tb-fold .tb-slot { width: 26px; height: 26px; cursor: inherit; }
.tool-belt .tb-fold .tb-belt { width: 20px; height: 20px; }
.tool-belt .tb-fold .tb-count { font-size: calc(14px * var(--ts, 1)); font-weight: 800; }
.tool-belt .tb-fold .tb-slot.on::after { top: auto; bottom: -7px; }
#hudStack .tool-belt .tb-card { left: 0; bottom: auto; top: calc(100% + 6px); transform: none; max-height: 60vh; overflow: auto; pointer-events: auto; }
body.alerting #hudStack .tool-belt { visibility: hidden; }

.inv-tools { margin-top: 14px; }
.inv-tools h3 { margin: 0 0 2px; }
.inv-tools .tb-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.inv-tools .tb-gear { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border: 1px solid #5a4e3a; border-radius: 6px; }
.inv-tools .tb-gear.none { border-style: dashed; }
.inv-tools .tb-pic { flex: none; display: grid; place-items: center; width: 40px; height: 36px; }
.inv-tools .tb-pic img { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.inv-tools .tb-pic svg { width: 26px; height: 26px; }
.inv-tools .tb-pic [hidden] { display: none; }
.inv-tools .tb-gear.none .tb-pic { opacity: 0.4; filter: grayscale(1); }
.inv-tools .tb-state { font-weight: 700; }
