:root {
  --panel: rgba(18, 20, 28, 0.82);
  --border: #000;
  --edge: #3b3f4c;
  --text: #f2f2f2;
  --muted: #a9adb8;
  --accent: #ff7a1a;
  --good: #5dff7a;
  --bad: #ff4a4a;
  --gold: #f2c94c;
  --pixel: 'Press Start 2P', monospace;
  --body: 'VT323', monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #111; color: var(--text); font-family: var(--body); font-size: 20px; }
canvas#view { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; image-rendering: pixelated; }
.hidden { display: none !important; }
img.pi { width: 1.1em; height: 1.1em; image-rendering: pixelated; vertical-align: -0.18em; display: inline-block; }
.slot span img.pi { width: 32px; height: 32px; vertical-align: middle; }
.modal-box .icon img.pi { width: 36px; height: 36px; }
.icons img.pi { width: 17px; height: 17px; }
#hotbar .armor img.pi { width: 15px; height: 15px; }
.tbtns img.pi { width: 26px; height: 26px; }
.mode h2 img.pi, .btn img.pi { width: 20px; height: 20px; vertical-align: -4px; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; }
#topbar { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 10px; align-items: flex-start; }
.panel { background: var(--panel); border: 3px solid var(--border); box-shadow: inset 0 0 0 2px var(--edge); padding: 8px 12px; }
.clockbox { text-align: center; min-width: 150px; }
#day { font-family: var(--pixel); font-size: 10px; color: var(--muted); }
#clock { font-family: var(--pixel); font-size: 22px; margin: 6px 0 4px; }
#period { font-size: 22px; line-height: 1; }
#objective { flex: 1; align-self: center; text-align: center; font-size: 22px; text-shadow: 2px 2px 0 #000; padding: 0 8px; }
/* the stats sit right above the hotbar, like Minecraft: hearts on the left, food on the right */
#stats { display: flex; flex-direction: column; gap: 2px; width: min(620px, 96vw); text-shadow: 2px 2px 0 #000; pointer-events: none; }
#stats .srow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#stats .bar { flex: 1; max-width: 220px; margin: 0; }
#stats .bar label { width: auto; }
#money { font-family: var(--pixel); font-size: 13px; color: var(--gold); }
#stats .icons { font-size: 17px; }
#stats .icons.food { flex-direction: row-reverse; }
.bar { display: flex; align-items: center; gap: 6px; margin: 4px 0; }
.bar label { width: 80px; font-size: 18px; }
.meter { flex: 1; height: 12px; background: #000; border: 2px solid #000; box-shadow: inset 0 0 0 1px #444; }
.meter > div { height: 100%; width: 50%; background: linear-gradient(#7dff8f, #2fbf4a); transition: width .15s linear; }
.meter.heat > div { background: linear-gradient(#ffcf4a, #ff7a1a); }
.meter.heat > div.hot { background: linear-gradient(#ff7a7a, #d11); animation: blink .5s steps(2) infinite; }
.icons { display: flex; gap: 1px; font-size: 15px; line-height: 1.2; margin: 2px 0; }
.icons span.h { opacity: .55; }
.icons span.e { opacity: .35; filter: grayscale(1); }
#rank { font-size: 17px; color: #ddd; }

#spotted { position: absolute; top: 120px; left: 50%; transform: translateX(-50%); font-family: var(--pixel); font-size: 13px; padding: 8px 14px; background: rgba(160, 10, 10, .85); border: 3px solid #000; opacity: 0; transition: opacity .15s; white-space: nowrap; }
#spotted.show { opacity: 1; animation: pulse .6s ease-in-out infinite alternate; }

#toasts { position: absolute; right: 10px; top: 150px; width: min(360px, 60vw); display: flex; flex-direction: column; gap: 6px; }
.toast { background: var(--panel); border: 3px solid #000; box-shadow: inset 0 0 0 2px var(--edge); padding: 6px 10px; font-size: 19px; transition: opacity .6s, transform .6s; animation: slidein .25s ease-out; }
.toast.fade { opacity: 0; transform: translateX(30px); }
.toast.money { box-shadow: inset 0 0 0 2px #8a7420; color: var(--gold); }
.toast.good { box-shadow: inset 0 0 0 2px #2a8a3a; color: var(--good); }
.toast.bad { box-shadow: inset 0 0 0 2px #8a2a2a; color: #ff8a8a; }
.toast.warn { box-shadow: inset 0 0 0 2px #8a5a20; color: #ffb46a; }
.toast.info { box-shadow: inset 0 0 0 2px #2a5a8a; color: #9fd4ff; }

#bottom { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; width: min(900px, 96vw); }
#prompt { background: var(--panel); border: 3px solid #000; padding: 6px 14px; font-size: 22px; opacity: 0; transition: opacity .1s; text-align: center; }
#prompt.show { opacity: 1; }
#prompt.illegal { box-shadow: inset 0 0 0 2px #8a5a20; }
#prompt .why { display: block; color: #ff8a8a; font-size: 18px; }
kbd { font-family: var(--pixel); font-size: 10px; background: #e8e8e8; color: #111; padding: 3px 6px; border-bottom: 3px solid #888; margin-right: 4px; vertical-align: middle; }

#hotbar { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; pointer-events: auto; background: rgba(0, 0, 0, .55); padding: 4px; border: 3px solid #000; }
.slot { position: relative; width: 52px; height: 52px; background: #8b8b8b; border: 3px solid; border-color: #373737 #fff #fff #373737; display: grid; place-items: center; cursor: pointer; }
.slot span { font-size: 28px; line-height: 1; }
.slot i { position: absolute; right: 3px; bottom: 0; font-style: normal; font-family: var(--pixel); font-size: 10px; text-shadow: 2px 2px 0 #3f3f3f; }
.slot em { display: none; position: absolute; bottom: 58px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: #1a0f2a; border: 2px solid #3a1f7a; padding: 2px 8px; font-style: normal; font-size: 17px; }
.slot:hover em { display: block; }
.slot.contra { background: #9a6b6b; }
.slot.job { background: #6b8bb0; }
.slot.worn { outline: 3px solid var(--good); }
#hotbar .empty { padding: 10px 14px; color: var(--muted); }

#minimap { position: absolute; right: 10px; bottom: 10px; width: 180px; height: 138px; border: 3px solid #000; box-shadow: 0 0 0 2px var(--edge); image-rendering: pixelated; background: #000; }

/* ---------- Modal ---------- */
#modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: grid; place-items: center; z-index: 10; padding: 16px; }
.modal-box { position: relative; background: #c6c6c6; color: #222; border: 4px solid #000; box-shadow: inset -4px -4px 0 #555, inset 4px 4px 0 #fff; padding: 22px 24px; width: min(760px, 100%); max-height: 88vh; overflow: auto; }
.modal-box h2 { font-family: var(--pixel); font-size: 18px; margin: 0 0 12px; line-height: 1.4; }
.modal-box h2.good { color: #1a7a2a; font-size: 26px; text-align: center; }
.modal-box h2.bad { color: #b00; font-size: 28px; text-align: center; }
.modal-box h3 { font-family: var(--pixel); font-size: 12px; margin: 10px 0 6px; }
.modal-box p { margin: 6px 0; }
.modal-box .sub { color: #444; }
.modal-box .money { color: #7a5a00; }
.close { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; font-size: 18px; border: 3px solid #000; background: #b33; color: #fff; cursor: pointer; }
.rows { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.row { display: flex; align-items: center; gap: 12px; background: #8b8b8b; border: 3px solid; border-color: #373737 #fff #fff #373737; padding: 6px 10px; color: #fff; }
.row.current { border-color: #1a6b26 #7dff8f #7dff8f #1a6b26; }
.row .icon { font-size: 30px; width: 40px; text-align: center; }
.row .info { flex: 1; display: flex; flex-direction: column; line-height: 1.05; }
.row .info b { font-size: 21px; text-shadow: 2px 2px 0 #3f3f3f; }
.row .info small { font-size: 17px; color: #eee; }
.row .info small.own { color: #ffe9a8; }
.tag { font-size: 14px; background: #b33; padding: 0 5px; vertical-align: middle; text-shadow: none; }
.craft { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.needs { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.chip { font-size: 17px; padding: 0 6px; border: 2px solid #000; }
.chip.ok { background: #2f7a3a; }
.chip.no { background: #7a2f2f; }
.list { margin: 6px 0; padding-left: 0; list-style: none; }
.list li { margin: 4px 0; }
.list li.done { color: #1a6b26; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.plan { background: #b0b0b0; border: 3px solid; border-color: #555 #eee #eee #555; padding: 8px 10px; }
.help { display: grid; gap: 4px; }

/* ---------- Buttons ---------- */
.btns { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.btns.col { flex-direction: column; align-items: center; }
.modes { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.mode { background: var(--panel); border: 3px solid #000; box-shadow: inset 0 0 0 2px var(--edge); padding: 14px 16px 18px; flex: 1 1 300px; max-width: 380px; }
.mode h2 { font-family: var(--pixel); font-size: 14px; margin: 0 0 8px; }
.mode p { margin: 0; color: var(--muted); font-size: 19px; }
.mode .btn { width: 100%; min-width: 0; }
.btn.small { min-width: 0; font-size: 11px; padding: 10px 16px; }
.btn { font-family: var(--pixel); font-size: 13px; padding: 14px 22px; min-width: 260px; cursor: pointer; color: #fff; text-shadow: 2px 2px 0 #3f3f3f; background: #6f6f6f; border: 3px solid #000; box-shadow: inset -3px -4px 0 #4a4a4a, inset 3px 3px 0 #a8a8a8; }
.btn:hover:not(:disabled) { background: #7c86c8; box-shadow: inset -3px -4px 0 #4f5a9a, inset 3px 3px 0 #b8c0f0; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.alt { background: #5a5a5a; }
.btn.buy, .btn.craftbtn { min-width: 100px; padding: 10px 12px; font-size: 11px; }

/* ---------- Screens ---------- */
.screen { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; overflow: auto; padding: 20px;
  background: radial-gradient(ellipse at center, rgba(20, 22, 30, .55), rgba(0, 0, 0, .92)),
    repeating-linear-gradient(90deg, #3b3b44 0 14px, #1c1c22 14px 40px); }
.title-inner { text-align: center; max-width: 820px; width: 100%; }
.logo { font-family: var(--pixel); font-size: clamp(34px, 9vw, 88px); margin: 0; color: #d9d9d9; letter-spacing: 4px;
  text-shadow: 4px 4px 0 #555, 8px 8px 0 #000; }
.logo span { color: var(--accent); text-shadow: 4px 4px 0 #8a3a00, 8px 8px 0 #000; }
.logo.free span { color: var(--good); text-shadow: 4px 4px 0 #1a6b26, 8px 8px 0 #000; }
.screen .tag { font-size: 24px; color: #ddd; margin: 18px 0; background: none; padding: 0; }
#howto { margin: 20px auto 0; text-align: left; }
#winStats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin: 20px auto; max-width: 640px; }
#winStats div { background: var(--panel); border: 3px solid #000; box-shadow: inset 0 0 0 2px var(--edge); padding: 10px; display: flex; flex-direction: column; }
#winStats span { color: var(--muted); }
#winStats b { font-family: var(--pixel); font-size: 13px; margin-top: 6px; }

#fade { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .45s; z-index: 15; }
#fade.on { opacity: 1; }

/* ---------- Touch ---------- */
#touch { display: none; }
body.touch #touch { display: block; }
#stick { position: absolute; left: 24px; bottom: 24px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255, 255, 255, .12); border: 3px solid rgba(255, 255, 255, .3); pointer-events: auto; touch-action: none; }
#knob { position: absolute; left: 40px; top: 40px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.tbtns { position: absolute; right: 16px; bottom: 170px; display: grid; grid-template-columns: repeat(3, 56px); gap: 8px; pointer-events: auto; }
.tbtns button { width: 56px; height: 56px; font-size: 22px; background: rgba(0, 0, 0, .55); color: #fff; border: 3px solid rgba(255, 255, 255, .35); touch-action: none; font-family: var(--pixel); }
.tbtns button.big { background: rgba(255, 122, 26, .7); }
.tbtns #tRun { font-size: 10px; }
body.touch #minimap { display: none; }
body.touch #bottom { bottom: 170px; }

@keyframes blink { 50% { filter: brightness(1.6); } }
@keyframes pulse { from { transform: translateX(-50%) scale(1); } to { transform: translateX(-50%) scale(1.06); } }
@keyframes slidein { from { opacity: 0; transform: translateX(30px); } }

@media (max-width: 760px) {
  #topbar { flex-wrap: wrap; }
  #objective { order: 3; flex-basis: 100%; font-size: 18px; }
  .clockbox { min-width: 110px; }
  #clock { font-size: 16px; }
  #spotted { top: 170px; font-size: 10px; }
  #toasts { top: 210px; }
  .btn { min-width: 0; width: 100%; }
  #minimap { width: 120px; height: 92px; }
}
.modal-box p.center { text-align: center; }

.slot b { position: absolute; left: 3px; top: 1px; font-family: var(--pixel); font-size: 8px; color: #eee; text-shadow: 1px 1px 0 #333; font-weight: normal; }
.slot.sel { outline: 3px solid #fff; outline-offset: 0; transform: translateY(-3px); }
.slot.contra.sel { outline-color: #ff6a6a; }
#hotbar .armor { display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 0 6px; margin-left: 4px; border-left: 2px solid #555; font-size: 13px; line-height: 1.05; }
#hotbar .armor .none { opacity: .3; text-align: center; }

/* ---------- Online ---------- */
#modal { z-index: 30; }
#netbar { position: absolute; top: 120px; left: 10px; background: var(--panel); border: 3px solid #000; box-shadow: inset 0 0 0 2px var(--edge); padding: 4px 10px; font-size: 18px; }
#netbar b { color: var(--gold); letter-spacing: 2px; }
#chat { position: absolute; left: 10px; bottom: 120px; width: min(420px, 70vw); display: flex; flex-direction: column; gap: 3px; font-size: 19px; text-shadow: 2px 2px 0 #000; }
#chat div { background: rgba(0, 0, 0, .45); padding: 2px 8px; flex: none; }
#chat div.old { display: none; }
#chat.open { pointer-events: auto; max-height: 45vh; overflow-y: auto; background: rgba(0, 0, 0, .35); padding: 4px; }
#chat.open div.old { display: block; }
#chat i { font-style: normal; }
#objective.hidden { display: none; }
#chat b { color: #8fe3ff; font-weight: normal; }
#chatPick { position: absolute; left: 10px; bottom: 124px; min-width: 200px; max-width: min(420px, 70vw); pointer-events: auto; background: rgba(0, 0, 0, .85); border: 3px solid #000; box-shadow: inset 0 0 0 2px var(--edge); font-family: var(--body); font-size: 20px; z-index: 5; }
#chatPick .pick { padding: 2px 10px; cursor: pointer; }
#chatPick .pick:hover { background: rgba(255, 255, 255, .15); }
#chatPick .none { padding: 2px 10px; color: #aaa; }
#chatInput { position: absolute; left: 10px; bottom: 86px; width: min(420px, 70vw); pointer-events: auto; font-family: var(--body); font-size: 20px; padding: 4px 8px; background: rgba(0, 0, 0, .75); color: #fff; border: 3px solid #000; box-shadow: inset 0 0 0 2px var(--edge); outline: none; }
.joinrow { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.joinrow input, .copts input { font-family: var(--pixel); font-size: 16px; padding: 8px 10px; width: 150px; text-transform: uppercase; text-align: center; border: 3px solid #000; background: #eee; }
.copts input { text-transform: none; text-align: left; width: 100%; font-size: 13px; margin-top: 4px; }
.joinrow .btn { min-width: 0; }
.joinrow.login input { width: min(280px, 70vw); text-transform: none; text-align: left; }
.custom { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; justify-content: center; }
#skinPrev { border: 3px solid #000; image-rendering: pixelated; flex: none; }
.copts { flex: 1; min-width: 240px; }
.copts label { display: block; font-family: var(--pixel); font-size: 11px; }
.copts h3 { margin: 10px 0 4px; }
.copts .row { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.copts .sw { width: 30px; height: 30px; border: 3px solid #000; cursor: pointer; padding: 0; }
.copts .sw.on { outline: 3px solid #fff; outline-offset: -6px; box-shadow: 0 0 0 2px #1a7a2a; }
.copts .opt { font-family: var(--body); font-size: 18px; padding: 2px 8px; border: 3px solid #000; background: #9a9a9a; cursor: pointer; }
.copts .opt.on { background: #5dbf6a; }
@media (max-width: 760px) { #netbar { top: 200px; font-size: 15px; } #chat { bottom: 230px; } #chatInput { bottom: 200px; } #chatPick { bottom: 238px; } }

/* the full isometric map (M) */
#bigmap { position: fixed; inset: 0; z-index: 40; background: #123049; cursor: grab; touch-action: none; }
#bigmap.drag { cursor: grabbing; }
#bigmap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#bigmap .bm-title { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); font-family: var(--pixel); font-size: 18px; color: #fff; text-shadow: 2px 2px 0 #000; pointer-events: none; }
#bigmap .bm-bar { position: absolute; bottom: 44px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
#bigmap .bm-bar .btn { min-width: 44px; font-size: 18px; }
#bigmap .bm-hint { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-size: 17px; color: #dfe6ee; text-shadow: 1px 1px 0 #000; pointer-events: none; padding: 0 16px; }
#bigmap.hidden { display: none; }

/* empty hotbar slots and the inventory button */
.slot.empty-slot { background: #777; opacity: .8; }
.slot.bag { background: #6b5a3a; margin-left: 4px; }
/* the inventory screen */
.modal-box.inv { width: min(500px, 96vw); user-select: none; padding: 14px 18px; }
.modal-box.inv h2 { margin: 0 0 6px; }
.modal-box.inv h3 { margin: 6px 0 4px; font-size: 13px; }
.modal-box.inv h3 small { display: block; font-family: 'VT323', monospace; font-size: 17px; font-weight: normal; margin-top: 2px; }
.igrid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; background: #c6c6c6; padding: 6px; border: 3px solid; border-color: #fff #555 #555 #fff; }
.igrid.hot { margin-bottom: 8px; }
.islot { position: relative; aspect-ratio: 1; background: #8b8b8b; border: 2px solid; border-color: #373737 #fff #fff #373737; display: grid; place-items: center; cursor: pointer; }
.islot:hover { background: #a8a8a8; }
.islot span { font-size: clamp(16px, 4.5vw, 26px); line-height: 1; }
.islot span img.pi { width: 26px; height: 26px; }
.islot i { position: absolute; right: 2px; bottom: 0; font-style: normal; font-family: var(--pixel); font-size: 9px; color: #fff; text-shadow: 2px 2px 0 #3f3f3f; }
.islot.contra { background: #9a6b6b; }
.islot.job { background: #6b8bb0; }
.islot.sel { outline: 3px solid #fff; }
.islot.armor { cursor: default; width: 44px; }
.islot.armor small { font-size: 12px; color: #444; }
.inv-top { display: flex; gap: 12px; align-items: center; margin: 6px 0; }
.iarmor { display: flex; flex-direction: row; gap: 3px; align-self: center; background: #c6c6c6; padding: 5px; border: 3px solid; border-color: #fff #555 #555 #fff; }
.ime { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 2px; font-size: 16px; line-height: 1.1; }
#icursor { position: fixed; pointer-events: none; transform: translate(-50%, -50%); z-index: 100; font-size: 28px; }
#icursor img.pi { width: 28px; height: 28px; }
#icursor i { position: absolute; right: -6px; bottom: -4px; font-style: normal; font-family: var(--pixel); font-size: 10px; text-shadow: 2px 2px 0 #3f3f3f; }

/* the spyglass: a full-screen first-person view through a round brass lens */
#spyglass { position: fixed; inset: 0; z-index: 60; background: #000; }
#spyglass.hidden { display: none; }
#sgCanvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; cursor: grab; touch-action: none; }
#sgCanvas:active { cursor: grabbing; }
#sgOverlay { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; }
.sg-lens { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 0, transparent min(48vw, 47vh), #6b4f1a calc(min(48vw, 47vh) + 1px), #d9b04a calc(min(48vw, 47vh) + 6px), #5a3e12 calc(min(48vw, 47vh) + 14px), #000 calc(min(48vw, 47vh) + 15px)); }
.sg-rain { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: repeating-linear-gradient(105deg, transparent 0 22px, rgba(200,220,245,0.35) 22px 23px, transparent 23px 47px); background-size: 100% 300px; animation: sgrain 0.35s linear infinite; }
@keyframes sgrain { from { background-position: 0 0; } to { background-position: -40px 300px; } }
.sg-compass, .sg-zoom { position: absolute; top: 14px; font-family: var(--pixel); font-size: 13px; color: #f2c94c; text-shadow: 2px 2px 0 #000; }
.sg-compass { left: 50%; transform: translateX(-50%); }
.sg-zoom { right: 70px; }
.sg-hint { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); color: #ddd; font-size: 18px; text-shadow: 2px 2px 0 #000; white-space: nowrap; }
.sg-close { position: absolute; top: 10px; right: 12px; }
#spyglass.cannon .sg-lens { background: radial-gradient(circle at 50% 50%, transparent 0, transparent min(46vw, 45vh), rgba(0,0,0,0.55) calc(min(46vw, 45vh) + 30px), #000 calc(min(48vw, 47vh) + 40px)); }
.sg-cannon.hidden { display: none; }
.sg-cross { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 3px solid rgba(255,80,60,0.9); border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 2px rgba(0,0,0,0.5); }
.sg-cross::before, .sg-cross::after { content: ''; position: absolute; background: rgba(255,80,60,0.9); }
.sg-cross::before { left: 50%; top: -12px; bottom: -12px; width: 2px; margin-left: -1px; }
.sg-cross::after { top: 50%; left: -12px; right: -12px; height: 2px; margin-top: -1px; }
.sg-ammo { position: absolute; top: 40px; left: 50%; transform: translateX(-50%); font-family: var(--pixel); font-size: 14px; color: #fff; text-shadow: 2px 2px 0 #000; }
.sg-msg { position: absolute; top: calc(50% + 40px); left: 50%; transform: translateX(-50%); font-family: var(--pixel); font-size: 14px; color: #ffd56a; text-shadow: 2px 2px 0 #000; white-space: nowrap; pointer-events: none; }
.sg-dist { position: absolute; left: 16px; bottom: 16px; font-family: var(--pixel); font-size: 11px; color: #e8e8e8; text-shadow: 2px 2px 0 #000; pointer-events: none; }
/* while the view chases a cannonball, the lens ring, crosshair and fire button fade away, and fade back after */
#spyglass .sg-lens, .sg-cross, .sg-fire { transition: opacity 0.6s ease; }
#spyglass.following .sg-lens, #spyglass.following .sg-cross, #spyglass.following .sg-fire { opacity: 0; }
#spyglass.following .sg-fire { pointer-events: none; }
.sg-fire { position: absolute; bottom: 52px; left: 50%; transform: translateX(-50%); }
.sg-cannon.kick .sg-cross { animation: sgkick 0.35s ease-out; }
@keyframes sgkick { 0% { transform: translateY(-14px) scale(1.3); } 100% { transform: none; } }
