/* Tank, the club's bulldog, on every page. 28 Oct 2026.
   He lives on the foot of the screen, over the page and under the arcade
   and the photo viewer, which send him away while they are open. Only he
   and his bubble take a tap; the strip he walks in does not. Drawn at twice
   the sheet's pixels on a wide screen and at 1.25 on a phone, smoothing off. */
.tank {
  position: fixed;
  left: 0;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 2px);
  z-index: 45;
  pointer-events: none;
  will-change: transform;
  --s: 2;
}
@media (max-width: 700px) { .tank { --s: 1.25; } }
.tank[hidden], .tank.away { display: none; }
.tank-dog {
  pointer-events: auto;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
.tank-dog.held { cursor: grabbing; }
.tank-dog:focus-visible { outline: 2px solid #f08030; outline-offset: 3px; }
.tank-img {
  display: block;
  width: calc(var(--fw) * var(--s) * 1px);
  height: calc(var(--fh) * var(--s) * 1px);
  background-repeat: no-repeat;
  image-rendering: pixelated;
}
.tank.flip .tank-img { transform: scaleX(-1); }

/* the bubble: cream, an ink rule, mono - the game's own dialogue box */
.tank-say {
  pointer-events: auto;
  position: absolute;
  bottom: 100%;
  left: 0;
  margin: 0 0 12px;
  width: max-content;
  max-width: min(290px, calc(100vw - 24px));
  padding: 10px 34px 11px 13px;
  background: #eae2d0;
  color: #070a0a;
  border: 2px solid #070a0a;
  box-shadow: 0 0 0 2px #eae2d0;
  font-family: 'Red Hat Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.02em;
  text-align: left;
}
.tank-say[hidden] { display: none; }
.tank-say p { margin: 0; min-height: 1.45em; }
/* the tail, three whole steps down towards him */
.tank-say::after {
  content: '';
  position: absolute;
  top: 100%;
  left: var(--tail, 30px);
  width: 12px;
  height: 10px;
  margin: 2px 0 0 -6px;
  background: #eae2d0;
  clip-path: polygon(0 0, 100% 0, 100% 34%, 67% 34%, 67% 67%, 34% 67%, 34% 100%, 0 100%);
}
.tank-off {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #070a0a;
  font: 700 16px/26px 'Red Hat Mono', ui-monospace, monospace;
  cursor: pointer;
}
.tank-off:focus-visible { outline: 2px solid #070a0a; outline-offset: -2px; }

/* sent home: one small plate brings him back */
.tank-back {
  position: fixed;
  left: calc(env(safe-area-inset-left, 0px) + 10px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  z-index: 45;
  margin: 0;
  padding: 6px 9px;
  border: 1px solid rgba(234, 226, 208, 0.5);
  background: #070a0a;
  color: #eae2d0;
  font: 700 10px/1 'Red Hat Mono', ui-monospace, monospace;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
}
.tank-back[hidden], .tank-back.away { display: none; }
.tank-back:focus-visible { outline: 2px solid #f08030; outline-offset: 2px; }

/* his menu, 30 Oct 2026: the game's dialogue menu, inside the bubble */
.tank-menu { display: flex; flex-direction: column; gap: 1px; margin: 8px 0 0; }
.tank-menu[hidden] { display: none; }
.tank-opt {
  position: relative;
  display: block;
  min-height: 32px;
  margin: 0;
  padding: 7px 8px 7px 18px;
  border: 0;
  background: none;
  color: #070a0a;
  font: 700 11px/1.3 'Red Hat Mono', ui-monospace, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}
.tank-opt::before { content: '\25B8'; position: absolute; left: 4px; top: 7px; opacity: 0; }
.tank-opt:hover, .tank-opt:focus-visible { background: rgba(7, 10, 10, 0.1); outline: none; }
.tank-opt:hover::before, .tank-opt:focus-visible::before { opacity: 1; }

/* what flies and floats: drawn as pixel art, three screen pixels a pixel */
.tank-food, .tank-puff { position: fixed; z-index: 46; pointer-events: none; image-rendering: pixelated; background-repeat: no-repeat; background-size: 100% 100%; }
.tank-snag {
  width: 42px; height: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 8' shape-rendering='crispEdges'%3E%3Crect x='1' y='3' width='12' height='4' fill='%23c98a43'/%3E%3Crect x='0' y='4' width='14' height='2' fill='%23c98a43'/%3E%3Crect x='1' y='2' width='12' height='2' fill='%238c3a1e'/%3E%3Crect x='2' y='2' width='9' height='1' fill='%23b5532c'/%3E%3Crect x='2' y='6' width='10' height='1' fill='%23a8692f'/%3E%3C/svg%3E");
}
.tank-onion {
  width: 24px; height: 27px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 9' shape-rendering='crispEdges'%3E%3Crect x='3' y='0' width='2' height='2' fill='%2389a35b'/%3E%3Crect x='1' y='2' width='6' height='6' fill='%23c9a6d8'/%3E%3Crect x='0' y='3' width='8' height='4' fill='%23c9a6d8'/%3E%3Crect x='2' y='3' width='1' height='4' fill='%23e6d4ef'/%3E%3Crect x='2' y='8' width='4' height='1' fill='%23a37cb8'/%3E%3C/svg%3E");
}
.tank-heart {
  width: 21px; height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 6' shape-rendering='crispEdges'%3E%3Cg fill='%23f08030'%3E%3Crect x='1' y='0' width='2' height='1'/%3E%3Crect x='4' y='0' width='2' height='1'/%3E%3Crect x='0' y='1' width='7' height='2'/%3E%3Crect x='1' y='3' width='5' height='1'/%3E%3Crect x='2' y='4' width='3' height='1'/%3E%3Crect x='3' y='5' width='1' height='1'/%3E%3C/g%3E%3C/svg%3E");
}
.tank-z { font: 700 16px/1 'Red Hat Mono', ui-monospace, monospace; color: #eae2d0; background: none; }
@media (max-width: 700px) {
  .tank-snag { width: 28px; height: 16px; }
  .tank-onion { width: 16px; height: 18px; }
  .tank-heart { width: 14px; height: 12px; }
}
