/* HUD mode (body.hud, knob "HUD"): the trail and the buttons sit in one bar across the top, drawn like a ship's console,
   and whatever you point at is named in a tag under the pointer. With the knob off the page is as it was. */
body.hud { --hud: #6fe3ff; --hud2: #ffb347; --hudbg: rgba(5, 16, 26, .86); --hudfont: 'Eurostile', 'Bank Gothic', 'Orbitron', 'Rajdhani', 'Share Tech Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
#hudbar, #hudtag { display: none; }
body.hud #hudbar { display: block; position: fixed; left: 0; right: 0; top: 0; height: 54px; z-index: 4; pointer-events: none;
  background: linear-gradient(var(--hudbg), rgba(5, 16, 26, .7)), repeating-linear-gradient(0deg, transparent 0 2px, rgba(111, 227, 255, .05) 2px 3px);
  border-bottom: 1px solid rgba(111, 227, 255, .55); box-shadow: 0 1px 0 rgba(111, 227, 255, .15), 0 8px 24px rgba(0, 0, 0, .5);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 18px) 100%, 62% 100%, calc(62% - 14px) calc(100% - 8px), 38% calc(100% - 8px), calc(38% - 14px) 100%, 18px 100%, 0 calc(100% - 12px)); }
body.hud #hudbar::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--hud) 12%, transparent 30%, transparent 70%, var(--hud2) 88%, transparent); opacity: .8; }
body.hud #place { left: 0; top: 0; height: 46px; max-width: none; right: 300px; padding: 0 14px 0 16px; border-radius: 0; background: none; display: flex; align-items: center; gap: 16px; text-shadow: none; z-index: 5; }
body.hud #place .crumbs { flex: none; flex-wrap: nowrap; gap: 4px; }
body.hud .crumb { font-family: var(--hudfont); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--hud); padding: 4px 6px; white-space: nowrap; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; }
body.hud #crumb-top { color: #eaffff; font-weight: 700; letter-spacing: .2em; }
body.hud button.crumb.link { color: var(--hud2); text-decoration: none; border-bottom: 1px solid rgba(255, 179, 71, .6); }
body.hud .crumb.here::before { content: '//'; margin-right: 8px; color: rgba(111, 227, 255, .5); }
body.hud #place-detail { flex: 1; min-width: 0; font-family: var(--hudfont); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: rgba(190, 236, 255, .7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.hud #aim { display: none; }
body.hud #buttons { top: 7px; right: 12px; gap: 6px; z-index: 5; }
body.hud .pill, body.hud #exit .pill { font-family: var(--hudfont); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--hud); background: rgba(8, 28, 42, .9); border: 1px solid rgba(111, 227, 255, .55); border-radius: 0; padding: 7px 14px; backdrop-filter: none;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
body.hud .pill:hover { background: rgba(20, 60, 84, .95); color: #eaffff; }
body.hud .pill[aria-pressed="true"], body.hud .pill[aria-expanded="true"] { background: rgba(255, 179, 71, .18); border-color: var(--hud2); color: var(--hud2); }
body.hud #knobs, body.hud #find { top: 62px; }
/* the tag under the pointer */
body.hud #hudtag { display: block; position: fixed; left: 0; top: 0; z-index: 6; pointer-events: none; max-width: min(360px, 78vw); padding: 8px 14px 9px 14px; font-family: var(--hudfont); color: #dff8ff;
  background: var(--hudbg); border: 1px solid rgba(111, 227, 255, .7); box-shadow: 0 0 18px rgba(111, 227, 255, .22), inset 0 0 18px rgba(111, 227, 255, .06);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px)); opacity: 0; transition: opacity .12s; will-change: transform; }
body.hud #hudtag.on, body.hud #hudtag.loading { opacity: 1; }
/* the loading bar lives in the tag: under the name when something is aimed at, on its own otherwise */
body.hud #progress { display: none; }
#hudtag .t:empty, #hudtag .n:empty, #hudtag .p { display: none; }
#hudtag.loading .p { display: block; min-width: 170px; margin-top: 9px; }
#hudtag .t:empty ~ .p { margin-top: 1px; }
#hudtag .p .bar { height: 3px; border-radius: 2px; background: #6fe3ff2e; overflow: hidden; }
#hudtag .p .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--hud), var(--hud2)); transition: width .35s ease-out; }
#hudtag .p span { display: block; margin-top: 5px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: #9fe9ff; }
#hudtag .t { font-size: 15px; letter-spacing: .1em; text-transform: uppercase; color: #ffffff; }
#hudtag .n { margin-top: 2px; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--hud2); }
#hudtag .d { margin-top: 6px; font: 13px/1.35 Georgia, serif; color: rgba(214, 240, 250, .88); letter-spacing: 0; text-transform: none; }
#hudtag .d:empty { display: none; }
body.hud.sheet-open #hudtag, body.hud.sheet-open #hudbar { display: none; }
/* phone: one row. The buttons are 40 px squares at the right; the trail takes the rest (main.js fitTrail sets its right
   edge and, when it does not fit, drops the counts, then shrinks the earlier parts to their mark, then the search label). */
#find-toggle .ico { display: none; }
@media (max-width: 700px) {
  body.hud #hudbar { height: 52px; }
  body.hud #place { top: 2px; right: 96px; height: 44px; padding: 0 2px 0 6px; gap: 0; }
  body.hud #place .crumbs { flex: 1 1 auto; min-width: 0; gap: 0; }
  body.hud .crumb { flex: 0 1 auto; min-width: 0; max-width: none; display: block; height: 40px; min-height: 40px; line-height: 40px; padding: 0 6px; font-size: 12.5px; letter-spacing: .08em; }
  body.hud .crumb[hidden] { display: none; }
  body.hud #place-detail { display: none; }
  body.hud #buttons { top: 2px; right: 6px; left: auto; height: 44px; align-items: center; gap: 4px; }
  body.hud #buttons .pill { box-sizing: border-box; min-width: 40px; height: 40px; padding: 0 10px; font-size: 11.5px; display: flex; align-items: center; justify-content: center; }
  body.hud #buttons .pill[hidden] { display: none; }
  body.hud #knob-toggle svg { display: block; }
  body.hud #knob-toggle { width: 40px; padding: 0; }
  body.hud #knobs, body.hud #find { top: 56px; } body.hud #hunt { top: 58px; } body.hud #stats { top: 56px; }
  body.hud.fit-0 #crumb-top { letter-spacing: .1em; } body.hud.fit-0 .crumb { padding: 0 4px; } body.hud.fit-0 #buttons .pill:not(#knob-toggle) { padding: 0 7px; letter-spacing: .08em; }
  body.hud.fit-1 #place .n { display: none; }
  body.hud.fit-2.trail-deep #crumb-top-name { display: none; }
  body.hud.fit-2.trail-deep #crumb-top { min-width: 40px; text-align: center; flex-shrink: 0; }
  body.hud.fit-2.trail-deep #crumb-mid:not(:last-child) { flex-shrink: 40; min-width: 4.5em; }
  body.hud.fit-3 #find-toggle { width: 40px; padding: 0; } body.hud.fit-3 #find-toggle .lbl { display: none; } body.hud.fit-3 #find-toggle .ico { display: block; }
}

