/* Top right, two views (hud.js): the same plain text on the world as the leaderboard (join.css),
   no backing, no border. */
#hud-views { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 4px; }
#hud-views button { background: none; border: 0; padding: 0; font: inherit; color: var(--dim); text-shadow: inherit; cursor: pointer; line-height: 20px; }
#hud-views button.on { color: var(--text); cursor: default; }

#mine { pointer-events: auto; }
#mine .who { display: flex; align-items: flex-end; justify-content: flex-end; gap: 8px; margin-bottom: 4px; }
#mine .figure { display: block; image-rendering: pixelated; image-rendering: crisp-edges; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.7)); }
#mine ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: auto auto; column-gap: 7px; justify-content: end; }
#mine li { display: contents; cursor: pointer; }
#mine li > span { line-height: 20px; cursor: pointer; }
#mine .n { text-align: right; font-variant-numeric: tabular-nums; }
#mine .w { white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
#mine li:hover > span { color: var(--accent); }
#mine .w i { font-style: normal; color: var(--dim); }

/* a phone: the same, a finger's height a row */
.m-compact #hud-views button { line-height: 32px; }
.m-compact #mine li > span { line-height: 28px; }

/* Who made a block (origin.js): a small label at the clicked spot, in the chat's look, on a plain
   black transparent rectangle; it hangs above the spot. */
#origin { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: default; margin: -10px 0 0 0;
  translate: 0 -100%; max-width: 300px; padding: 5px 8px; background: rgba(0, 0, 0, 0.55); text-shadow: none; z-index: 2; }
#origin .line { line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
#origin.full .line { -webkit-line-clamp: unset; display: block; }
#origin .head { width: 14px; height: 14px; vertical-align: -3px; margin-right: 5px; image-rendering: pixelated; }
#origin .who { font-weight: bold; }
#origin .said { color: var(--text); }
.m-compact #origin { max-width: min(260px, calc(100vw - 2 * var(--gap))); }

/* a phone held upright: the map tile under the whole top-left panel, however tall your account and
   the checklist's row make it (hud.js keeps --panel-h) */
.m-compact:not(.m-land) #bottom-right { top: calc(var(--sat) + var(--gap) + var(--panel-h, 42px) + 6px); }

/* A hint (hints.js), top left: one line and its x on a card; with the account or the checklist
   under it, joined to that card as #account is (the same card, no gap). */
#hint { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 8px 8px 8px 14px;
  background: var(--card); font-size: 13px; line-height: 1.35; color: var(--muted); text-shadow: none; }
#hint:has(~ #account:not([hidden]), ~ #checklist:not([hidden])) { padding-bottom: 0; margin-bottom: -8px; }
#hint[hidden] { display: none; }
#hint .hint-t { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#hint .hint-x { flex: none; background: none; border: 0; padding: 0 4px; font: inherit; font-size: 16px; line-height: 18px; color: var(--muted); cursor: pointer; }
#hint .hint-x:hover { color: var(--text); }
.m-compact #hint { font-size: 12px; padding-left: 10px; padding-right: 6px; }
/* a phone: with the hint over it, the checklist's row is as wide as the hint (one card) */
.m-compact #top-left:has(> #hint:not([hidden])) > #checklist { width: 100%; }

/* One big button in the bar ("My base"): the bar's whole width on a phone, centred at its natural
   width on a desktop. (The bar is launch.css's: its phone grid is two columns whatever it holds.) */
.m-compact:not(.m-land) #bottom-center #bigs:not(:has(> :not([hidden]) ~ :not([hidden]))) { grid-template-columns: 1fr; }
:root:not(.m-compact) #bottom-center #bar:not(:has(> #bigs > :not([hidden]) ~ :not([hidden]))) { padding-left: 10px; }

/* An agent tapped (agent-row.js): one row where the bar was, on the bar's own rectangle. */
.agent-open #bottom-center #bar, .agent-open #bottom-center #follow-chip { display: none; }
#bottom-center #agent-row { width: 460px; max-width: 100%; box-sizing: border-box; display: flex; align-items: center; gap: 8px; padding: 10px; background: var(--card); text-shadow: none; }
#bottom-center #agent-row[hidden] { display: none; }
#agent-row .mark { display: flex; flex: none; }
#agent-row .mark:empty { display: none; }
#agent-row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; margin-right: 6px; }
#agent-row .t b { font-weight: 600; }
#agent-row .do { color: var(--muted); }
#bottom-center #agent-row .cta { flex: none; padding: 0 14px; }
#bottom-center #agent-row .cta.follow.on { background: #fff; color: #0d1015; }
#bottom-center #agent-row .cta.close { padding: 0 12px; background: none; color: var(--muted); font-size: 20px; }
.m-compact:not(.m-land) #bottom-center #agent-row .cta.close { font-size: 22px; }

/* The gear, right of the top-left panel, and beside it: centre on your agents (hud.js: what the bar's
   button does), only on a page that is a player's or follows one, and not where there is no world to
   move over. All 44 px, the height of who you are. */
#q-row { position: absolute; z-index: 3; left: calc(var(--panel-r, var(--gap)) + 6px); top: calc(var(--gap) + var(--sat)); display: flex; gap: 6px; }
/* (the HUD lets the world be touched through it: its buttons are the exception) */
#q-row > * { pointer-events: auto; }
.m-compact.check-open #q-row, .m-compact.spectating:not(.playing) #q-row { display: none; }
/* (a phone: room for them between a long name and the leaderboard) */
.m-compact:not(.m-land) #account { max-width: calc(100vw - 2 * var(--gap) - 150px - 56px); box-sizing: border-box; }
/* Who you are, when it stands alone (a phone with its list shut): centred in its own box. A
   computer's joins the list under it and keeps no space below (launch.css). */
.m-compact:not(.check-open) #account { padding: 0 12px; margin-bottom: 0; box-sizing: border-box; }
#acct-head { display: flex; flex: none; }
.m-compact #acct-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* (a phone's small map tile grows at a tap: a button for that would cover a third of it) */
.m-compact:not(.map-big) #minimap-size { display: none; }
/* A phone's boxes along the top are one height, 44 px. The connection's is its one line; what a
   refused sign-in says under it stays, since that is what to do. */
.m-compact #hud-views { min-height: 44px; align-items: center; }
.m-compact #banner { min-height: 44px; box-sizing: border-box; padding: 0 12px; display: flex; flex-wrap: wrap; align-items: center; align-content: center; }
.m-compact #banner[hidden] { display: none; }
.m-compact #banner:not(.auth) .bsub { display: none; }
.m-compact #banner.auth { padding: 6px 12px; }
/* A phone, upright: one row top left, beside who you are (--acct-r, --acct-t: hud.js): settings,
   locate, the map. The map is its button there (pressed: the whole map, ui.js), never a tile.
   Who you are gives way to the two words top right on a narrow phone. */
.m-compact:not(.m-land) #q-row { flex-direction: row; gap: 4px; left: calc(var(--acct-r, var(--panel-r, 0px)) + 4px); top: var(--acct-t, calc(var(--gap) + var(--sat))); }
.m-compact:not(.m-land):not(.check-open) #account { max-width: calc(100vw - 274px - var(--sal) - var(--sar)); padding: 0 8px; gap: 6px; }
.m-compact:not(.m-land) #account > .grow { display: none; }
.m-compact:not(.m-land) #acct-caret { margin-left: auto; margin-right: 2px; }
.m-compact:not(.m-land):not(.map-big) #minimap-wrap { display: none; }
.m-compact:not(.m-land):not(.map-big) #q-map-back { display: grid; }
.m-compact:not(.m-land):not(.map-big) #bottom-right { left: calc(var(--acct-r, var(--panel-r, 0px)) + 52px); top: var(--acct-t, calc(var(--gap) + var(--sat))); }
.m-compact:not(.m-land):not(.map-big).has-crew:not(.no-gpu) #bottom-right { left: calc(var(--acct-r, var(--panel-r, 0px)) + 100px); }
/* (the whole map stands by itself in the middle: its place in the row is empty, not a dark strip) */
.m-compact:not(.m-land).map-big #q-map-back { display: none; }
.m-compact:not(.m-land).map-big #bottom-right { background: none; padding: 0; }
#q-locate { display: none; place-items: center; width: 44px; height: 44px; padding: 0; background: rgba(0, 0, 0, 0.55); color: #fff; text-shadow: none; }
.m-compact.has-crew:not(.no-gpu) #q-locate { display: grid; }

/* the one tooltip (tip.js): plain words on a plain black rectangle */
#tip { position: fixed; z-index: 60; width: max-content; max-width: min(260px, calc(100vw - 12px)); padding: 6px 9px; background: rgba(0, 0, 0, 0.85); color: #fff; font: 13px/1.35 var(--font); text-shadow: none; pointer-events: none; white-space: normal; }
#tip[hidden] { display: none; }

/* what the pointer is on in the world, as the tooltip */
#tooltip { padding: 6px 9px; background: rgba(0, 0, 0, 0.85); color: #fff; font: 13px/1.35 var(--font); text-shadow: none; }

/* Reset camera: a desktop's, always; words alone, beside the bar, or over it where there is no room */
#b-reset { display: none; font-size: 13px; color: #fff; text-shadow: var(--shade); white-space: nowrap; }
:root:not(.m-compact):not(.no-gpu) #b-reset { display: block; }
@media (min-width: 1241px) { #bottom-center > #b-reset { position: absolute; left: calc(100% + 12px); bottom: 0; height: 62px; } }

/* The screenshot (shot.js): the camera beside the gear, as the gear is. Then a flash, and a card
   with the picture over the bar; the picture large over everything where it can only be saved by
   pressing and holding it. */
#q-shot { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; background: rgba(0, 0, 0, 0.55); color: #fff; text-shadow: none; }
#q-shot:hover { background: rgba(0, 0, 0, 0.75); }
#q-shot.busy { opacity: 0.6; cursor: progress; }
.no-gpu #q-shot { display: none; }
#shot-flash { position: fixed; inset: 0; z-index: 70; background: #fff; opacity: 0; pointer-events: none; }
#shot-flash.on { animation: shot-flash 0.42s ease-out; }
@keyframes shot-flash { 0% { opacity: 0.85; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #shot-flash.on { animation-duration: 0.2s; } @keyframes shot-flash { 0% { opacity: 0.3; } 100% { opacity: 0; } } }
#shot-card { position: fixed; z-index: 65; left: 50%; bottom: calc(var(--gap) + var(--sab) + var(--bc-h, 64px) + 12px); transform: translateX(-50%);
  display: flex; gap: 12px; align-items: stretch; padding: 10px; width: max-content; max-width: calc(100vw - 24px);
  background: rgba(10, 13, 18, 0.88); border: 1px solid var(--card-line); color: #fff; font: 13px/1.35 var(--font); text-shadow: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45); animation: shot-in 0.22s ease-out; -webkit-user-select: none; user-select: none; }
#shot-card.out { opacity: 0; transform: translateX(-50%) translateY(8px); transition: opacity 0.22s, transform 0.22s; }
@keyframes shot-in { from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.97); } to { opacity: 1; transform: translateX(-50%); } }
#shot-card .thumb { flex: none; padding: 0; border: 1px solid rgba(255, 255, 255, 0.25); background: #000; cursor: zoom-in; line-height: 0; }
#shot-card .thumb img { display: block; width: 168px; height: 100px; object-fit: cover; }
#shot-card .side { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#shot-card .top { display: flex; align-items: center; gap: 8px; }
#shot-card .top b { font-size: 14px; }
#shot-card .x { margin-left: auto; padding: 0 4px; background: none; color: var(--muted); font-size: 20px; line-height: 1; }
#shot-card .said { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#shot-card .acts { display: flex; gap: 6px; margin-top: auto; }
#shot-card .acts button { min-width: 64px; height: 34px; padding: 0 12px; background: rgba(255, 255, 255, 0.12); color: #fff; font: 600 13px var(--font); }
#shot-card .acts button:hover { background: rgba(255, 255, 255, 0.2); }
#shot-card .acts button.primary { background: #fff; color: #0d1015; }
.m-compact #shot-card { top: calc(var(--sat) + var(--gap) + 56px); bottom: auto; }
.m-compact #shot-card .thumb img { width: 112px; height: 84px; }
.m-compact #shot-card .acts button { height: 40px; }
#shot-large { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: calc(var(--sat) + 52px) calc(var(--sar) + 12px) calc(var(--sab) + 20px) calc(var(--sal) + 12px); background: rgba(0, 0, 0, 0.9); }
/* (the picture itself takes the press: the browser's own "Save to Photos") */
#shot-large img { max-width: 100%; max-height: calc(100% - 40px); object-fit: contain; box-shadow: 0 6px 30px rgba(0, 0, 0, 0.6);
  -webkit-user-select: auto; user-select: auto; -webkit-touch-callout: default; pointer-events: auto; touch-action: auto; }
#shot-large p { margin: 0; color: #fff; font: 15px var(--font); }
#shot-large .x { position: absolute; top: calc(var(--sat) + 8px); right: calc(var(--sar) + 8px); width: 44px; height: 44px; background: none; color: #fff; font-size: 28px; }
/* (a phone: by itself above the bar, bottom right; round, as the compass is) */
.m-compact #q-shot { position: absolute; pointer-events: auto; right: calc(var(--gap) + var(--sar)); bottom: calc(var(--gap) + max(var(--sab), var(--sheet-h)) + var(--bc-h, 64px) + 10px); border-radius: 50%; z-index: 3; }
/* (the lines above the bar stop short of it) */
.m-compact:not(.m-land):not(.no-gpu) #bottom-left { right: calc(var(--gap) + var(--sar) + 52px); }
.m-compact.check-open #q-shot, .m-compact.map-big #q-shot { display: none; }
