/* walk mode ("spacer", js/walk.js): HUD button, street name + hints, phone joystick + jump */
#hud .row > #walkBtn { display: inline-flex; align-items: center; gap: 5px; }
#walkBtn .wk-ico { display: block; image-rendering: pixelated; flex: 0 0 auto; }
#walkBtn.active { background: var(--accent); }
@media (max-width: 600px) { #hud .row > #walkBtn { margin-left: 0; flex: 1 1 auto; justify-content: center; } }
@media (max-width: 380px) { #hud .row > #walkBtn { padding: 0 4px; font-size: 13px !important; } }

#walkHud { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 15; display: flex; flex-direction: column;
  align-items: center; gap: 6px; pointer-events: none; max-width: calc(100vw - 32px); }
#walkHud[hidden] { display: none; }
#walkHud .wk-street { pointer-events: auto; display: flex; align-items: center; gap: 8px; background: var(--paper); border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink); padding: 4px 6px 4px 10px; font-size: 18px; white-space: nowrap; max-width: 100%; }
#walkHud .wk-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
#walkHud.none .wk-name { font-weight: 400; opacity: .6; }
#walkHud .wk-ico2 svg { display: block; }
#walkHud .wk-x { font: inherit; font-size: 14px; width: 28px; height: 26px; background: #fff; border: 2px solid var(--ink); cursor: pointer; color: var(--ink); }
#walkHud .wk-hint { background: rgba(244, 236, 216, .88); border: 2px solid var(--ink); padding: 3px 8px; font-size: 13px; white-space: nowrap; }
#walkHud kbd { font: 11px "Silkscreen", monospace; border: 1px solid var(--ink); border-bottom-width: 2px; padding: 0 3px; margin-right: 2px; background: #fff; }

/* today's event card waits while walking (every screen size: on a desktop it crowded the walk HUD and the
   game card); it slides back in after the walk */
body.walking .egg-card { visibility: hidden; transform: translateY(calc(100% + 60px)); }

#walkPad { position: fixed; inset: auto 0 0 0; height: 0; z-index: 24; }   /* over the event cards (eggs.css 22-23) */
#walkPad[hidden] { display: none; }
#walkPad .wk-stick { position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: max(18px, env(safe-area-inset-bottom)); width: 116px; height: 116px;
  border-radius: 50%; border: 3px solid var(--ink); background: rgba(244, 236, 216, .45); touch-action: none; user-select: none; -webkit-user-select: none; }
#walkPad .wk-stick i { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); pointer-events: none; }
#walkPad .wk-jump { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(28px, env(safe-area-inset-bottom)); width: 74px; height: 74px;
  border-radius: 50%; border: 3px solid var(--ink); background: var(--paper); box-shadow: 3px 3px 0 var(--ink); font: 600 16px "Pixelify Sans", monospace;
  color: var(--ink); touch-action: none; user-select: none; -webkit-user-select: none; }
#walkPad .wk-jump.on { background: var(--accent); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* phone: the name sits under the HUD (placed by walk.js), the pad owns the bottom of the screen */
@media (max-width: 600px), (pointer: coarse) {
  #walkHud { bottom: auto; top: 120px; }
  #walkHud .wk-hint { display: none; }
  #walkHud .wk-street { font-size: 14px; gap: 6px; padding: 2px 8px; border-width: 2px; box-shadow: 3px 3px 0 var(--ink); }
  #walkHud .wk-ico2 svg { width: 10px; height: 13px; }
  /* walking: the HUD folds to one row ("wyjdź" + "odkryj"), the exit lives there, not in the pill */
  body.walking #hud .title, body.walking #hud .lbl-where, body.walking #hud .row > :not(#walkBtn):not(#okBtn):not(#povBtn):not(#godBtn):not(#mpBtn) { display: none; }
  body.walking #hud { padding: 6px 8px; }
  body.walking #hud .row { margin-top: 0; flex-wrap: nowrap; }
  body.walking #walkHud .wk-x { display: none; }
  body.walking #credits { display: none; }
}
@media (pointer: fine) and (min-width: 601px) { #walkHud .wk-x { display: none; } }

/* first-person view ("oczy", js/walk-pov.js): the toggle next to the walk exit; the map names and the game's
   map pins are laid out for the iso camera, so they go while looking through the walker's eyes */
#hud .row > #povBtn { display: inline-flex; align-items: center; }
#hud .row > #povBtn[hidden] { display: none; }
#povBtn.active { background: var(--accent); }
@media (max-width: 600px) { #hud .row > #povBtn { margin-left: 0; flex: 0 0 auto; padding: 0 6px; } }
@media (max-width: 380px) { #hud .row > #povBtn { padding: 0 4px; font-size: 13px !important; } }
body.walk-pov #labels, body.walk-pov #okPins, body.walk-pov #retroPins { display: none; }   /* (the retro pins too: they follow the iso camera) */
/* underground (js/retro/mine-underground.js): the town's names and pins are far overhead; the depth counter of the
   cage ride (and the level below), a dark pill over the street name */
body.walk-under #labels, body.walk-under #okPins, body.walk-under #retroPins { display: none; }
#walkHud .wk-depth { display: flex; align-items: center; gap: 8px; background: #1d1a17; color: #f1e6c8; border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(43, 36, 51, .35); padding: 3px 10px; font: 600 16px "Pixelify Sans", monospace; white-space: nowrap; }
#walkHud .wk-depth[hidden] { display: none; }
#walkHud .wk-depth b { color: #e8b730; font-weight: 600; }
#walkHud .wk-depth .wk-dm { min-width: 4.2em; text-align: right; font-variant-numeric: tabular-nums; }
#walkHud .wk-depth i { display: block; width: 64px; height: 8px; border: 2px solid #f1e6c8; position: relative; }
#walkHud .wk-depth i::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--k, 0%); background: #e8b730; }
@media (max-width: 600px) { #walkHud .wk-depth { font-size: 14px; padding: 2px 8px; gap: 6px; } #walkHud .wk-depth i { width: 44px; } }
body.walk-pov #map { cursor: crosshair; }

/* angel mode ("tryb anielski", js/walk.js; "god" in the names): the toggle "anioł" after "oczy", a dark pill
   over the street name (level, speed, height), on a phone the jump button turns into "up" with "down" under
   it and a speed button beside them */
#hud .row > #godBtn { display: inline-flex; align-items: center; }
#hud .row > #godBtn[hidden] { display: none; }
#godBtn.active { background: var(--accent); }
/* (a phone: "oczy" and "anioł" a little tighter - the row of five buttons stays inside the HUD at 390 px) */
@media (max-width: 600px) { #hud .row > #godBtn { margin-left: 0; flex: 0 0 auto; padding: 0 6px; } }
@media (max-width: 380px) { #hud .row > #godBtn { padding: 0 4px; font-size: 13px !important; } }
/* the narrowest phones (320 px): the walk's five buttons - wyjdź, oczy, anioł, razem, odkryj - stay one row inside the HUD */
@media (max-width: 340px) {
  body.walking #hud .row { gap: 3px; }
  #hud .row > #walkBtn, #hud .row > #povBtn, #hud .row > #godBtn { padding: 0 3px; font-size: 12px !important; }
  body.walking #hud .row > #walkBtn { gap: 3px; }
}
/* the action pill of the spot the walker stands in (walk-spots.js): unveil the image, play the hejnal, sit ... */
#walkHud .wk-unveil { pointer-events: auto; font: 600 16px "Pixelify Sans", monospace; color: var(--ink); background: var(--accent); border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink); padding: 4px 12px; cursor: pointer; white-space: nowrap; }
#walkHud .wk-unveil[hidden] { display: none; }
#walkHud .wk-unveil:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
/* the music volume (walk-spots.js): under the pill while a tune plays or can be played where the walker stands */
#walkHud .wk-vol { pointer-events: auto; display: flex; align-items: center; gap: 8px; background: var(--paper); border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink); padding: 2px 8px; font-size: 13px; white-space: nowrap; cursor: default; }
#walkHud .wk-vol[hidden] { display: none; }
#walkHud .wk-vol input { width: 130px; margin: 0; accent-color: var(--accent); cursor: pointer; }
#walkHud .wk-vol output { min-width: 4ch; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 600px), (pointer: coarse) { #walkHud .wk-vol { padding: 4px 10px; } #walkHud .wk-vol input { width: 150px; height: 26px; } }
#walkHud .wk-god { background: var(--ink); color: var(--paper); border: 2px solid var(--ink); box-shadow: 3px 3px 0 rgba(43, 36, 51, .35);
  padding: 2px 9px; font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
#walkHud .wk-god[hidden] { display: none; }
#walkHud .wk-god b { color: var(--accent); margin-right: 4px; letter-spacing: 1px; }
#walkPad .wk-down, #walkPad .wk-speed { display: none; }
#walkPad.god .wk-jump { bottom: calc(max(28px, env(safe-area-inset-bottom)) + 86px); display: flex; align-items: center; justify-content: center; }
#walkPad.god .wk-down { display: flex; align-items: center; justify-content: center; position: fixed; right: max(16px, env(safe-area-inset-right));
  bottom: max(28px, env(safe-area-inset-bottom)); width: 74px; height: 74px; border-radius: 50%; border: 3px solid var(--ink); background: var(--paper);
  box-shadow: 3px 3px 0 var(--ink); touch-action: none; user-select: none; -webkit-user-select: none; }
#walkPad .wk-down.on { background: var(--accent); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
#walkPad.god .wk-speed { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; position: fixed;
  right: calc(max(16px, env(safe-area-inset-right)) + 88px); bottom: calc(max(28px, env(safe-area-inset-bottom)) + 52px); width: 64px; height: 64px;
  border-radius: 50%; border: 3px solid var(--ink); background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 rgba(43, 36, 51, .35);
  font: 600 22px/1 "Pixelify Sans", monospace; touch-action: none; user-select: none; -webkit-user-select: none; }
#walkPad .wk-speed b { color: var(--accent); }
#walkPad .wk-speed small { font-size: 10px; margin-top: 2px; }
#walkPad .wk-jump svg, #walkPad .wk-down svg { display: block; image-rendering: pixelated; }

/* local business card (walk-places.js): a paper card over the walk HUD; a bottom sheet on phones */
#walkBiz { position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 16; width: min(380px, calc(100vw - 32px)); background: var(--paper);
  border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); padding: 10px 14px 8px; font-size: 16px; line-height: 1.25; }
#walkBiz[hidden] { display: none; }
#walkBiz .wb-x { position: absolute; right: 6px; top: 4px; z-index: 1; border: 0; background: none; font: inherit; font-size: 18px; cursor: pointer; color: var(--ink); padding: 2px 6px; }
/* (z-index: the kind line under it is translucent, so it painted over the x and took the taps on its lower half) */
#walkBiz .wb-kind { font-size: 13px; opacity: .65; text-transform: uppercase; letter-spacing: 1px; }
#walkBiz .wb-name { display: block; font-size: 22px; margin: 0 22px 4px 0; }
#walkBiz .wb-text { margin: 0 0 6px; }
#walkBiz .wb-hours { font-size: 14px; opacity: .8; margin-bottom: 8px; }
#walkBiz .wb-row { display: flex; flex-wrap: wrap; gap: 8px; }
#walkBiz .wb-row > * { font: 600 15px "Pixelify Sans", monospace; color: var(--ink); background: var(--accent); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  padding: 3px 10px; cursor: pointer; text-decoration: none; }
#walkBiz .wb-row > [hidden] { display: none; }
#walkBiz .wb-row > a { background: var(--paper); }
#walkBiz .wb-foot { margin-top: 8px; font-size: 12px; opacity: .55; }
/* phone: a bottom sheet over the walk controls while open, like the wardrobe sheet and the game's talk sheet (z 26 over
   the pad's 24), scrolling if taller than the room under the HUD; the joystick, "skok" / the angel buttons and "jazda"
   hide meanwhile (a short card left the top of "jazda" showing); its x or the pill closes it */
@media (max-width: 600px), (pointer: coarse) {
  #walkBiz { bottom: max(12px, env(safe-area-inset-bottom)); font-size: 15px; z-index: 26; max-height: calc(100vh - 156px); overflow-y: auto; }
  #walkBiz .wb-name { font-size: 19px; }
  body:has(#walkBiz:not([hidden])) #walkPad, body:has(#walkBiz:not([hidden])) #driveFab { visibility: hidden; }
}

/* the pixel font draws the "fi" ligature as one odd glyph: keep the letters apart in running text */
#walkBiz, #walkHud .wk-unveil { font-variant-ligatures: none; font-feature-settings: "liga" 0, "clig" 0; }

/* wardrobe ("szafa", js/walk.js + js/wardrobe-ui.js): the button in the street pill, the panel (a card on the
   right on a desktop, a sheet over the bottom on a phone), the toast of a new unlock over the walk HUD */
#walkHud .wk-wear { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 14px; height: 26px; padding: 0 6px;
  background: #fff; border: 2px solid var(--ink); color: var(--ink); cursor: pointer; }
#walkHud .wk-wear svg { display: block; flex: 0 0 auto; }
#walkHud .wk-wear.active { background: var(--accent); }
#walkHud .wk-toast { pointer-events: none; background: var(--accent); color: var(--ink); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  padding: 3px 10px; font-size: 15px; text-align: center; max-width: min(520px, calc(100vw - 32px)); }
#walkHud .wk-toast[hidden] { display: none; }
.wk-wear-panel { position: fixed; right: 16px; top: 128px; width: 318px; max-height: calc(100vh - 250px); overflow: auto; z-index: 21;
  background: var(--paper); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); padding: 6px 12px 10px; font-size: 15px; color: var(--ink);
  overscroll-behavior: contain; font-variant-ligatures: none; font-feature-settings: "liga" 0, "clig" 0; }
.wk-wear-panel[hidden] { display: none; }
.wk-wear-panel .ww-head { display: flex; align-items: center; gap: 8px; }
.wk-wear-panel .ww-head b { font-size: 20px; }
.wk-wear-panel .ww-n { flex: 1 1 auto; font-size: 13px; opacity: .7; }
.wk-wear-panel .ww-x { font: inherit; font-size: 14px; width: 28px; height: 26px; background: #fff; border: 2px solid var(--ink); cursor: pointer; color: var(--ink); }
.wk-wear-panel h4 { margin: 8px 0 4px; font-size: 14px; font-weight: 600; border-bottom: 2px solid rgba(43, 36, 51, .18); }
.wk-wear-panel .ww-sw, .wk-wear-panel .ww-chips, .wk-wear-panel .ww-faces { display: flex; flex-wrap: wrap; gap: 5px; }
.wk-wear-panel .ww-sw + .ww-chips { margin-top: 5px; }
.wk-wear-panel .ww-c { width: 24px; height: 24px; padding: 0; border: 2px solid var(--ink); background: var(--c); cursor: pointer; }
.wk-wear-panel .ww-c.on { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.wk-wear-panel .ww-chip { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 14px; padding: 2px 7px; background: #fff;
  border: 2px solid var(--ink); color: var(--ink); cursor: pointer; }
.wk-wear-panel .ww-chip.on, .wk-wear-panel .ww-face.on { background: var(--accent); }
.wk-wear-panel .ww-chip kbd { font: 10px "Silkscreen", monospace; border: 1px solid var(--ink); border-bottom-width: 2px; padding: 0 3px; background: #fff; }
.wk-wear-panel .ww-face { position: relative; padding: 2px; line-height: 0; background: #fff; border: 2px solid var(--ink); cursor: pointer; }
.wk-wear-panel .ww-face svg { display: block; }
.wk-wear-panel .ww-face .ww-lk { position: absolute; right: -3px; bottom: -3px; }
.wk-wear-panel .lock { opacity: .6; border-style: dashed; background: rgba(255, 255, 255, .5); }
.wk-wear-panel .ww-lk { display: block; flex: 0 0 auto; }
.wk-wear-panel .ww-hint { min-height: 1.25em; margin: 8px 0 0; font-size: 13px; line-height: 1.3; }
.wk-wear-panel .ww-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.wk-wear-panel .ww-foot small { flex: 1 1 140px; font-size: 12px; opacity: .65; line-height: 1.2; }
.wk-wear-panel .ww-btn { font: 600 14px "Pixelify Sans", monospace; padding: 2px 10px; background: var(--paper); border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink); color: var(--ink); cursor: pointer; }
@media (max-width: 600px), (pointer: coarse) {
  #walkHud .wk-wear { font-size: 13px; height: 22px; padding: 0 4px; gap: 3px; }
  #walkHud .wk-toast { font-size: 13px; padding: 2px 8px; }
  .wk-wear-panel { left: 8px; right: 8px; top: auto; bottom: max(8px, env(safe-area-inset-bottom)); width: auto; max-height: 42vh; z-index: 26;
    padding: 4px 10px 8px; font-size: 14px; border-width: 2px; box-shadow: 3px 3px 0 var(--ink); }
  .wk-wear-panel h4 { margin: 6px 0 3px; }
  .wk-wear-panel .ww-c { width: 26px; height: 26px; }
  .wk-wear-panel .ww-chip kbd { display: none; }
}
@media (max-width: 380px) { #walkHud .wk-wear span { display: none; } }

/* phone (owner 01.12.2026: "the controls take a lot of the screen"): the spot's pill (hejnal, ...), the music
   volume and the street with the wardrobe in one row under the bar - the volume without its words, the wardrobe as
   its hanger; the toast drops under the row */
@media (max-width: 600px), (pointer: coarse) {
  #walkHud { flex-direction: row; flex-wrap: nowrap; justify-content: center; gap: 5px; }
  #walkHud .wk-toast { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); }
  #walkHud .wk-unveil { font-size: 14px; padding: 2px 8px; border-width: 2px; box-shadow: 2px 2px 0 var(--ink); flex: 0 0 auto; }
  #walkHud .wk-vol { padding: 2px 6px; gap: 4px; flex: 0 0 auto; }
  #walkHud .wk-vol::before { content: '\266A'; font-size: 14px; }
  #walkHud .wk-vol span, #walkHud .wk-vol output { display: none; }
  #walkHud .wk-vol input { width: 64px; height: 22px; }
  #walkHud .wk-street { min-width: 0; flex: 0 1 auto; }
  #walkHud .wk-wear { padding: 0 4px; height: 22px; }
  #walkHud .wk-wear span { display: none; }
}
/* the bar folded (hud.js, the chevron / U): the walk's row goes with it (the joystick stays) */
body.hud-off #walkHud { display: none !important; }
