/* Campaign (T-35, docs/gdd.md «Интерфейс»; the look: the «Карта кампании» mockup). Built on the
   pixel kit in ui.css: its tokens, fonts and buttons.

   The map  #campaign is a .screen that scrolls; .cmap-track is as tall as the scaled map and
            paints the three districts edge to edge (lake, park, yard) — so a wide screen shows
            them under the whole width; .cmap is the 390×844 map itself, scaled by campaign.js.
            Inside: .crack, .cdot (.on — the walked part of the path), .cplate (district),
            .ccrown, .cboss (.on — a boss already reached), .cnode (.done / .cur / .locked,
            .boss), .ckid.
   The card .level-card over the field during a level's countdown: crown, name, hearts. */

/* the body forbids touch panning (the field takes the touches); the map scrolls vertically */
.overlay.screen.campaign { background: #dfe7ef; touch-action: pan-y; }

.cmap-track {
  position: relative; flex: none; width: 100%; height: 844px; overflow: hidden;
  /* the districts: hard stops, flat bands — lake, its shore line, park, a line, yard */
  background: linear-gradient(to bottom,
    #cfe9f5 0 33.886%, #a9d3e6 33.886% 34.36%,
    #e8eef5 34.36% 67.536%, #c9d6e3 67.536% 68.009%,
    #dfe7ef 68.009% 100%);
}
.cmap {
  position: absolute; left: 50%; top: 0; width: 390px; height: 844px;
  transform-origin: 50% 0; transform: translateX(-50%);
}
.cmap > * { position: absolute; display: block; }
.cmap svg { display: block; }
.cmap .crack { background: #a9d3e6; }
.cdot { width: 8px; height: 8px; background: var(--muted); }
.cdot.on { background: var(--blue); }

.cplate, .cboss {
  font-family: var(--font-title); font-size: 9px; line-height: 10px; white-space: nowrap;
  text-transform: uppercase;
}
.cplate { right: 16px; padding: 6px 8px; color: var(--navy); background: #fff; border: 4px solid var(--ink); }
.cboss { padding: 5px 8px; color: var(--snow-2); background: var(--ink); }
.cboss.on { color: var(--gold); }

.cnode {
  display: flex; align-items: center; justify-content: center; box-sizing: border-box;
  min-width: 0; margin: 0; padding: 0;
  font-family: var(--font-title); font-size: 18px; line-height: 1; color: var(--navy);
  border: 4px solid var(--ink); border-radius: 0; box-shadow: 0 4px 0 var(--ink);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.cnode.done { background: var(--blue); }
.cnode.cur { background: var(--gold); box-shadow: 0 0 0 6px rgba(242, 196, 67, 0.45), 0 4px 0 var(--ink); }
.cnode.boss.cur { font-size: 22px; }
.cnode.locked { background: var(--muted); cursor: default; }
.cnode:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.cnode.cur:active { box-shadow: 0 0 0 6px rgba(242, 196, 67, 0.45), 0 1px 0 var(--ink); }
.cnode:disabled { opacity: 1; transform: none; box-shadow: 0 4px 0 var(--ink); }
.cnode:focus-visible { outline: 3px solid var(--gold-3); outline-offset: 3px; }

.cmap-back { position: fixed; top: max(16px, env(safe-area-inset-top)); left: 16px; z-index: 1; }
.cmap-status {
  position: fixed; left: 50%; top: 42%; transform: translateX(-50%); z-index: 1;
  font-family: var(--font-title); font-size: 12px; color: #fff;
}
#btn-campaign-retry { position: fixed; left: 50%; top: calc(42% + 64px); margin-left: -26px; z-index: 1; }

/* ---------- the opponent card at the start of a level ---------- */

.level-card {
  position: absolute; left: 50%; top: 22%; transform: translateX(-50%); z-index: 1;
  display: none; flex-direction: column; align-items: center; gap: 10px;
  padding: 12px 16px; pointer-events: none;
  background: rgba(15, 30, 46, 0.9); border: 4px solid #2f4e6d;
}
.level-card.show { display: flex; }
.level-card.boss { border-color: var(--gold); }
.level-card .lc-who { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.level-card .lc-name {
  font-family: var(--font-title); font-size: 12px; line-height: 14px; white-space: nowrap;
  text-transform: uppercase; color: #fff;
}
.level-card.boss .lc-name { color: var(--gold); }
.level-card .lc-hearts { display: flex; gap: 3px; }
.level-card .lc-hearts svg { display: block; }
