:root {
  --ink: #2b2433;
  --paper: #f4ecd8;
  --accent: #e8b730;
  --sky: #9fc6e6;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--sky); font-family: "Pixelify Sans", monospace; color: var(--ink); }
#map { position: fixed; inset: 0; width: 100vw; height: 100vh; image-rendering: pixelated; touch-action: none; display: block; }
#labels { position: fixed; inset: 0; pointer-events: none; }
.lbl { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font-size: 13px; color: #fff;
  text-shadow: 1px 0 var(--ink), -1px 0 var(--ink), 0 1px var(--ink), 0 -1px var(--ink), 1px 1px var(--ink); letter-spacing: .5px; }
.lbl.suburb, .lbl.town { font-size: 16px; font-weight: 600; text-transform: uppercase; }
#hud { position: fixed; top: 12px; left: 12px; background: var(--paper); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); padding: 8px 10px; }
#hud .title { font-weight: 600; font-size: 18px; letter-spacing: 1px; }
#hud .row { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
#hud button { font: inherit; font-size: 16px; width: 32px; height: 28px; background: #fff; border: 2px solid var(--ink); cursor: pointer; }
#hud button:active { transform: translate(1px, 1px); }
#time { width: 120px; accent-color: var(--accent); }
#clock { min-width: 52px; font-family: "Silkscreen", monospace; font-size: 13px; }
#loading { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); background: var(--paper); border: 3px solid var(--ink); padding: 6px 12px; }
#loading.done { display: none; }
#credits { position: fixed; right: 8px; bottom: 6px; font-size: 11px; color: var(--ink); display: flex; flex-direction: column;
  align-items: flex-end; gap: 3px; pointer-events: none; }
#credits .cr { opacity: .75; }
/* discreet pixel-art link (gem + name), full strength only on hover / focus */
#dbjLink { pointer-events: auto; display: inline-flex; align-items: center; gap: 4px; padding: 1px 3px; font-family: "Silkscreen", monospace;
  font-size: 10px; color: var(--ink); text-decoration: none; background: rgba(244, 236, 216, .55); opacity: .7;
  transition: opacity .15s steps(2, end); }
#dbjLink:hover, #dbjLink:focus-visible { opacity: 1; background: var(--paper); outline: 2px solid var(--ink); }
#dbjLink svg { display: block; width: 14px; height: 10px; }
@media (max-width: 600px) {
  #hud { top: 8px; left: 8px; right: 8px; }
  #hud .title { font-size: 15px; }
  #time { flex: 1; }
  #credits { left: 8px; right: 8px; font-size: 10px; align-items: flex-start; }
}
#compass { position: relative; overflow: hidden; }
#compass i { position: absolute; left: 50%; top: 50%; width: 14px; height: 20px; margin: -10px 0 0 -7px; font-style: normal;
  font-size: 11px; line-height: 9px; color: #c0392b; display: flex; flex-direction: column; align-items: center; transform-origin: 50% 50%; }
#compass i::after { content: "▼"; color: var(--ink); opacity: .45; }
#compass b { position: absolute; right: 2px; bottom: 0; font-size: 9px; }
#hud .row { flex-wrap: wrap; row-gap: 6px; }
#hud .row > button { flex: 0 0 auto; }
#hud .row > #time { flex: 1 1 90px; min-width: 90px; }
/* phone: the mode buttons that wrap to the second row share its full width evenly */
@media (max-width: 600px) { #hud .row > #tourBtn, #hud .row > #retroBtn, #hud .row > #zniczBtn { margin-left: 0; flex: 1 1 auto; justify-content: center; } }
/* small phones (360 px): keep all three mode buttons on one row */
@media (max-width: 380px) { #hud .row > #tourBtn, #hud .row > #retroBtn, #hud .row > #zniczBtn { padding: 0 4px; font-size: 13px !important; } }
/* "warstwy" panel button (layers.js, css/layers.css): last on the desktop row, icon only next to the compass on a phone */
#hud .row > #layersBtn { order: 5; display: inline-flex; align-items: center; gap: 5px; }
#layersBtn .pl-ico { display: block; image-rendering: pixelated; flex: 0 0 auto; }
#layersBtn.active { background: var(--accent); }
@media (max-width: 600px) { #hud .row > #layersBtn { order: 0; padding: 0 6px; } #layersBtn span { display: none; } }
/* text of the page for screen readers and search engines (index.html #pkText; the map itself is a canvas) */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
