/* The Campaigns tab's carousel (src/ui/campaign_carousel.js): one campaign at a time, its cover filling a framed stage,
   the text over a dark fall at its foot, arrows on both edges and a strip of the twenty emblems under it; the details
   take the campaign's colour --cc (set on #panel-campaign, src/ui/campaign_tint.js) and the menu's backdrop its --bg-*
   (menu.css). Then the mission select, the panel's second state: the same frame with the mission's picture, a strip of
   film frames under it (src/ui/campaign.js). The briefing: screens.css; the objectives' list and the art slot: menu.css. */
@property --cc { syntax: '<color>'; inherits: true; initial-value: #d83a2c; }
#panel-campaign::before { background: linear-gradient(90deg, transparent, var(--cc), transparent); transition: --cc .9s ease; }
/* (the card's height: what the window leaves under the menu's head - the whole tab without scrolling at 1400x860 and
   up - but never taller than 0.64 of its width, where the 16:9 covers would lose too much of their sides) */
.cc { --cc-h: clamp(330px, min(calc(100vh - 382px), 64cqw), 620px); container-type: inline-size; display: flex; flex-direction: column; gap: 10px; transition: --cc .9s ease; }

/* ---------------- the stage: the frame stays, the cards slide inside it (the mission select's frame too) */
:is(.cc-stage, .msn-stage) { position: relative; isolation: isolate; overflow: hidden; border: 1px solid #000; border-radius: 6px; background: #08090a; touch-action: pan-y; user-select: none;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--cc) 42%, #2a2e33), 0 0 36px color-mix(in srgb, var(--cc) 16%, transparent), 0 18px 40px rgba(0, 0, 0, .75); }
:is(.cc-stage, .msn-stage)::before { content: ''; position: absolute; z-index: 4; left: 0; right: 0; top: 0; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent 3%, var(--cc) 28%, color-mix(in srgb, var(--cc) 45%, #fff) 50%, var(--cc) 72%, transparent 97%);
  box-shadow: 0 0 14px var(--cc); }
/* the corner marks of a sight */
:is(.cc-stage, .msn-stage)::after { --k: color-mix(in srgb, var(--cc) 70%, #fff); content: ''; position: absolute; z-index: 4; inset: 10px; pointer-events: none; opacity: .8;
  background: linear-gradient(var(--k), var(--k)) 0 0 / 24px 2px no-repeat, linear-gradient(var(--k), var(--k)) 0 0 / 2px 24px no-repeat,
    linear-gradient(var(--k), var(--k)) 100% 0 / 24px 2px no-repeat, linear-gradient(var(--k), var(--k)) 100% 0 / 2px 24px no-repeat,
    linear-gradient(var(--k), var(--k)) 0 100% / 24px 2px no-repeat, linear-gradient(var(--k), var(--k)) 0 100% / 2px 24px no-repeat,
    linear-gradient(var(--k), var(--k)) 100% 100% / 24px 2px no-repeat, linear-gradient(var(--k), var(--k)) 100% 100% / 2px 24px no-repeat; }
.cc-view { display: grid; }
.cc-card { grid-area: 1 / 1; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-width: 0; min-height: var(--cc-h); }
.cc-card.out { pointer-events: none; }

/* the cover - or, until it is painted, the faction's emblem large over its colour */
.cc-hero { position: absolute; inset: 0; z-index: 0; }
.cc-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.cc-ph { position: absolute; inset: 0;
  background: radial-gradient(ellipse 55% 70% at 70% 42%, color-mix(in srgb, var(--cc) 34%, transparent), transparent 72%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .03) 0 2px, transparent 2px 15px), linear-gradient(160deg, #1a1c21, #08090b 72%); }
/* a sight's rings and cross over the emblem: the campaign still in the planners' hands */
.cc-ph::after { --r: color-mix(in srgb, var(--cc) 30%, rgba(255, 255, 255, .1)); content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 42%, transparent 0 21%, var(--r) 21% calc(21% + 1px), transparent calc(21% + 1px) 31%, var(--r) 31% calc(31% + 1px),
      transparent calc(31% + 1px) 41%, color-mix(in srgb, var(--r) 60%, transparent) 41% calc(41% + 1px), transparent calc(41% + 1px)),
    linear-gradient(90deg, transparent calc(70% - .5px), color-mix(in srgb, var(--r) 70%, transparent) calc(70% - .5px) calc(70% + .5px), transparent calc(70% + .5px)),
    linear-gradient(0deg, transparent calc(58% - .5px), color-mix(in srgb, var(--r) 70%, transparent) calc(58% - .5px) calc(58% + .5px), transparent calc(58% + .5px)); }
.cc-ph img { position: absolute; left: 70%; top: 42%; width: min(48%, 440px); height: auto; aspect-ratio: 1; transform: translate(-50%, -50%); opacity: .24;
  filter: blur(1.2px) saturate(.7) drop-shadow(0 18px 30px #000); }
.cc-prompt { position: absolute; z-index: 1; right: 30px; top: 54px; width: min(340px, 40%); display: flex; flex-direction: column; gap: 5px; padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 4px; background: rgba(6, 7, 9, .7); }
.cc-prompt b { font: 600 10px var(--font-d); letter-spacing: 1.4px; text-transform: uppercase; color: var(--gold); }
.cc-prompt span { max-height: 92px; overflow-y: auto; font: 11px/1.45 "Segoe UI", Tahoma, sans-serif; color: var(--t3); user-select: text; }
/* the fall of dark under the text, the darker edges under the arrows, the campaign's glow in a corner */
.cc-shade { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(0deg, rgba(6, 6, 8, .97) 0, rgba(6, 6, 8, .88) 22%, rgba(6, 6, 8, .55) 47%, transparent 70%),
    linear-gradient(180deg, rgba(0, 0, 0, .62), transparent 19%),
    linear-gradient(90deg, rgba(0, 0, 0, .5), transparent 13%, transparent 87%, rgba(0, 0, 0, .5)),
    radial-gradient(ellipse 55% 45% at 12% 100%, color-mix(in srgb, var(--cc) 24%, transparent), transparent); }

/* ---------------- the text */
.cc-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 30px 0; }
.cc-num { font: 600 13px var(--font-d); letter-spacing: 3px; color: #bdb6a8; text-shadow: 0 1px 3px #000; }
.cc-num b { margin-right: 6px; font: 700 24px var(--font-d); letter-spacing: 2px; color: #fff; }
.cc-top .camp-tag { background: rgba(6, 7, 9, .62); backdrop-filter: blur(3px); }
.cc-body { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 9px; padding: 0 84px 28px; }
.cc-head { display: flex; align-items: center; gap: 16px; }
.cc-emb { flex: none; width: 76px; height: 76px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .85)) drop-shadow(0 0 16px color-mix(in srgb, var(--cc) 45%, transparent)); }
.cc-kick { display: block; font: 600 12.5px var(--font-d); letter-spacing: 4px; text-transform: uppercase; color: color-mix(in srgb, var(--cc) 45%, #fff);
  text-shadow: 0 1px 2px #000, 0 0 10px #000, 0 0 18px rgba(0, 0, 0, .8); }  /* (readable on the pale covers too - the Heron's pink fog) */
.cc-title { margin: 3px 0 0; font: 700 44px/1 var(--font-d); font-stretch: condensed; letter-spacing: 5px; text-transform: uppercase; color: #f8f3e9;
  text-shadow: 0 2px 0 #000, 0 0 30px rgba(0, 0, 0, .9); }
.cc-blurb { margin: 0; max-width: 640px; color: #ddd7cb; font-size: 14.5px; line-height: 1.5; text-shadow: 0 1px 3px #000; }
.cc-blurb:empty { display: none; }
.cc-card.soon .cc-blurb { color: #b3ac9f; font-style: italic; }
.cc-card.soon .cc-emb { filter: grayscale(.35) drop-shadow(0 4px 6px rgba(0, 0, 0, .85)); }

/* the missions: a picture each, its segment of progress under it (the strip gives way to the button, which keeps one
   line: the thumbnails shrink from 96 px down to 64) */
.cc-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-top: 8px; }
.cc-strip { flex: 0 1 auto; min-width: 0; display: flex; gap: 8px; padding-bottom: 9px; }
.cc-strip:empty { display: none; }
.cc-m { position: relative; display: block; flex: 0 1 auto; width: 96px; min-width: 64px; height: auto; aspect-ratio: 16 / 9; padding: 0; border: 1px solid #000; border-radius: 3px; background: #121418;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 4px 10px rgba(0, 0, 0, .65); transition: transform .15s, box-shadow .15s; }
.cc-m .cc-mi { position: absolute; inset: 0; overflow: hidden; border-radius: 2px; }
.cc-m img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s, filter .25s; }
.cc-m i { position: absolute; left: 4px; top: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; font: 700 11px/18px Consolas, monospace; font-style: normal;
  color: #fff; background: rgba(0, 0, 0, .75); box-shadow: 0 0 0 1px rgba(255, 255, 255, .2); }
.cc-m::after { content: ''; position: absolute; left: 1px; right: 1px; bottom: -10px; height: 4px; border-radius: 2px; background: #1b1e22; box-shadow: 0 0 0 1px #000; }
@media (hover: hover) { .cc-m:not(.locked):hover { transform: translateY(-2px); background: #121418; box-shadow: 0 0 0 1px color-mix(in srgb, var(--cc) 80%, #fff), 0 6px 14px rgba(0, 0, 0, .7); } }
@media (hover: hover) { .cc-m:not(.locked):hover img { transform: scale(1.08); } }
.cc-m:active { transform: none; }
.cc-m.done i { color: #1d1606; background: var(--gold); box-shadow: 0 0 6px rgba(240, 200, 80, .6); }
.cc-m.done::after { background: var(--gold); box-shadow: 0 0 0 1px #000, 0 0 6px rgba(240, 200, 80, .5); }
/* the next mission: a half-filled segment ("in progress", told from the gold of done whatever the campaign's hue) */
.cc-m.cur { box-shadow: 0 0 0 1px #000, 0 0 0 2px color-mix(in srgb, var(--cc) 50%, #fff), 0 0 14px color-mix(in srgb, var(--cc) 55%, transparent), 0 4px 10px rgba(0, 0, 0, .65); }
.cc-m.cur i { background: color-mix(in srgb, var(--cc) 75%, #000); }
.cc-m.cur::after { background: linear-gradient(90deg, var(--cc) 0 50%, color-mix(in srgb, var(--cc) 22%, #1b1e22) 50%); box-shadow: 0 0 0 1px #000, 0 0 8px var(--cc); }
.cc-m.locked { cursor: default; }
@media (hover: hover) { .cc-m.locked:hover { background: #121418; box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 4px 10px rgba(0, 0, 0, .65); } }
.cc-m.locked img { filter: grayscale(1) brightness(.42); }
.cc-m.empty { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 8px), linear-gradient(#15171b, #0b0c0e); opacity: .8; }  /* a mission still to come */
.cc-m.locked i { display: none; }
.cc-m.locked .cc-mi::after { content: ''; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; background: #cfc9bb;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4 7V5a4 4 0 0 1 8 0v2h1.5v8h-11V7zm2 0h4V5a2 2 0 0 0-4 0z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4 7V5a4 4 0 0 1 8 0v2h1.5v8h-11V7zm2 0h4V5a2 2 0 0 0-4 0z'/%3E%3C/svg%3E") center / contain no-repeat; }
.cc-act { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin-left: auto; }
.cc-act > .ab { width: 272px; }  /* (the card's action: the action bar's main plate alone, as wide as the longest caption - "Choose a mission") */
.cc .camp-voice { padding: 11px 20px; border: 1px solid color-mix(in srgb, var(--cc) 55%, #000); font: 600 13px var(--font-d); letter-spacing: 2px; text-transform: uppercase;
  color: var(--t1); background: rgba(8, 9, 11, .72); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 0 16px color-mix(in srgb, var(--cc) 22%, transparent); }
@media (hover: hover) { .cc .camp-voice:hover { border-color: var(--cc); background: color-mix(in srgb, var(--cc) 22%, rgba(8, 9, 11, .85));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 0 20px color-mix(in srgb, var(--cc) 40%, transparent); } }

/* the tags: the progress, "wkrótce" with a lock */
.camp-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border: 1px solid rgba(240, 200, 80, .45); border-radius: 12px; color: var(--gold);
  font: 600 11px var(--font-d); letter-spacing: 1.6px; text-transform: uppercase; white-space: nowrap; }
.camp-tag.prog { color: #e6e0d3; border-color: color-mix(in srgb, var(--cc) 55%, #3a4047); }
.camp-tag.soon::before { content: ''; width: 11px; height: 11px; background: var(--gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4 7V5a4 4 0 0 1 8 0v2h1.5v8h-11V7zm2 0h4V5a2 2 0 0 0-4 0z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4 7V5a4 4 0 0 1 8 0v2h1.5v8h-11V7zm2 0h4V5a2 2 0 0 0-4 0z'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ---------------- the arrows on the edges */
.cc-arrow { position: absolute; z-index: 3; top: 50%; width: 50px; height: 108px; margin-top: -54px; padding: 0; display: grid; place-items: center; cursor: pointer;
  color: #ece8df; border: 1px solid rgba(255, 255, 255, .1); border-radius: 4px; background: rgba(8, 9, 11, .5); backdrop-filter: blur(4px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 6px 16px rgba(0, 0, 0, .5); transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.cc-arrow.prev { left: 16px; }
.cc-arrow.next { right: 16px; }
.cc-arrow svg { width: 20px; height: 40px; filter: drop-shadow(0 2px 2px #000); transition: transform .15s; }
.cc-arrow.next svg { transform: scaleX(-1); }
@media (hover: hover) { .cc-arrow:hover { color: color-mix(in srgb, var(--cc) 40%, #fff); border-color: var(--cc); background: color-mix(in srgb, var(--cc) 24%, rgba(8, 9, 11, .7));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 0 18px color-mix(in srgb, var(--cc) 45%, transparent), 0 6px 16px rgba(0, 0, 0, .5); } }
@media (hover: hover) { .cc-arrow.prev:hover svg { transform: translateX(-2px); } }
@media (hover: hover) { .cc-arrow.next:hover svg { transform: scaleX(-1) translateX(-2px); } }
.cc-arrow:active { transform: none; }
.cc-arrow[hidden] { display: none; }

/* ---------------- the strip of emblems: every campaign, the one shown lit */
.cc-index { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; padding: 5px 8px 7px; border-radius: 5px;
  background: linear-gradient(rgba(8, 9, 11, .55), rgba(8, 9, 11, .25)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05); }
.cc-index button { position: relative; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid transparent; border-radius: 50%;
  background: none; box-shadow: none; }
.cc-index img { width: 28px; height: 28px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .75)); transition: transform .15s, filter .15s; }
.cc-index button.soon img { filter: grayscale(.75) brightness(.62) drop-shadow(0 2px 2px rgba(0, 0, 0, .75)); }
@media (hover: hover) { .cc-index button:hover { background: rgba(255, 255, 255, .07); box-shadow: none; } }
@media (hover: hover) { .cc-index button:hover img { transform: scale(1.12); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .75)); } }
.cc-index button:active { transform: none; }
.cc-index button.is-cur { border-color: var(--cc); background: radial-gradient(circle, color-mix(in srgb, var(--cc) 38%, transparent), transparent 72%);
  box-shadow: 0 0 12px color-mix(in srgb, var(--cc) 50%, transparent); }
.cc-index button.is-cur img { transform: scale(1.12); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .75)); }
.cc-index button.is-cur::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 14px; height: 2px; margin-left: -7px; background: var(--cc); box-shadow: 0 0 6px var(--cc); }

/* ---------------- the mission select (the panel's second state - src/ui/campaign.js; docs/NAVIGATION.md 10): the carousel's
   film zooming in. The chosen mission's picture fills the same frame, the campaign's title card over its top, the enemy of a
   mission already won at its top right, the number, title and blurb over the fall at its foot, the map as a radar in the
   corner; under it the missions as a strip of film frames and the objectives known at the start; the difficulty and the
   saves in the action bar's dock (nothing under it at rest). The heights: what the window leaves under the menu's head -
   re-measure (tools/look/nav_measure.mjs) when the head, the rail or the dock change. */
.msn-view { --objs-h: clamp(54px, calc(100vh - 846px), 140px); --stage-h: clamp(250px, calc(100vh - 398px - var(--objs-h)), 560px); --tile-h: 74px; --radar: 132px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.msn-stage { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); column-gap: 16px; height: var(--stage-h); padding: 20px 26px; }
/* (the sight's corner marks smaller than the carousel's: they stay in the frame's margin, clear of the texts) */
.msn-stage::after { inset: 8px; --a: 16px 2px no-repeat; --b: 2px 16px no-repeat;
  background: linear-gradient(var(--k), var(--k)) 0 0 / var(--a), linear-gradient(var(--k), var(--k)) 0 0 / var(--b), linear-gradient(var(--k), var(--k)) 100% 0 / var(--a),
    linear-gradient(var(--k), var(--k)) 100% 0 / var(--b), linear-gradient(var(--k), var(--k)) 0 100% / var(--a), linear-gradient(var(--k), var(--k)) 0 100% / var(--b),
    linear-gradient(var(--k), var(--k)) 100% 100% / var(--a), linear-gradient(var(--k), var(--k)) 100% 100% / var(--b); }
.msn-stage > .msn-art { position: absolute; inset: 0; z-index: 0; border: 0; border-radius: 0; box-shadow: none; background: #0b0c0e; }
.msn-art img { object-position: 50% 42%; animation: msn-pic .55s cubic-bezier(.16, .84, .3, 1) both; }  /* (a new picture settles in - once, as it comes) */
@keyframes msn-pic { from { opacity: 0; transform: scale(1.035); } }
.msn-art .prompt { z-index: 1; bottom: 56%; padding: 62px calc(var(--radar) + 44px) 0 26px; }  /* (no picture yet - a draft: its prompt under the title card, over the fall, clear of the texts and the radar; the campaign's line gives way) */
.msn-stage:has(.prompt) .msn-sub { display: none; }
/* the fall of dark under the texts, a lighter one under the title card, the campaign's glow in a corner (as .cc-shade) */
.msn-art::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, rgba(6, 6, 8, .96) 0, rgba(6, 6, 8, .82) 24%, rgba(6, 6, 8, .38) 50%, transparent 68%),
    linear-gradient(180deg, rgba(0, 0, 0, .74), rgba(0, 0, 0, .4) 16%, transparent 32%),
    radial-gradient(ellipse 55% 50% at 8% 100%, color-mix(in srgb, var(--cc) 22%, transparent), transparent); }
/* the campaign's title card (a header with no button - NAVIGATION.md 2.3) */
.msn-top { grid-area: 1 / 1; position: relative; z-index: 2; padding: 0; border: 0; }
.msn-top .msn-cap { display: flex; align-items: center; gap: 12px; font-size: 24px; text-shadow: 0 2px 0 #000, 0 0 18px rgba(0, 0, 0, .9); }
.msn-cap img { flex: none; width: 40px; height: 40px; margin: -6px 0; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .8)) drop-shadow(0 0 8px color-mix(in srgb, var(--cc) 40%, transparent)); }
.msn-top .msn-sub { max-width: 640px; margin-top: 10px; color: #cfc8ba; text-shadow: 0 1px 2px #000, 0 0 10px #000; }  /* (clear of the emblem, which hangs 6 px under its line) */
/* the enemy of a mission already won (D23 - never ahead of the play) */
.msn-foe { grid-area: 1 / 2; align-self: start; position: relative; z-index: 3; display: flex; align-items: center; gap: 8px; margin-top: -4px; padding: 4px 12px 4px 5px; border-radius: 24px;
  background: rgba(6, 7, 9, .66); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 4px 12px rgba(0, 0, 0, .5); }
.msn-foe[hidden] { display: none; }
.msn-foe img { width: 34px; height: 34px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .8)); }
.msn-foe span { display: flex; flex-direction: column; line-height: 1.1; }
.msn-foe small { font: 600 9.5px var(--font-d); letter-spacing: 1.6px; text-transform: uppercase; color: var(--t3); }
.msn-foe b { font: 700 13px var(--font-d); letter-spacing: 1px; text-transform: uppercase; color: #f1ece2; white-space: nowrap; }
/* the texts over the fall: the kicker (the number of the five, a done one's result), the title, the blurb */
.msn-main { grid-area: 2 / 1 / 3 / 3; position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-height: 0; padding-right: calc(var(--radar) + 36px); }
.msn-kick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; }
.msn-num { font: 600 12px var(--font-d); letter-spacing: 3px; text-transform: uppercase; color: color-mix(in srgb, var(--cc) 45%, #fff); text-shadow: 0 1px 2px #000, 0 0 10px #000; }
.msn-num b { margin: 0 5px 0 1px; font: 700 20px var(--font-d); letter-spacing: 2px; color: #fff; }
.msn-num small { font: inherit; color: #bdb6a8; }
.msn-best { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border: 1px solid rgba(240, 200, 80, .5); border-radius: 12px; background: rgba(6, 7, 9, .62);
  font: 600 11px var(--font-d); letter-spacing: 1.2px; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.msn-best::before { content: ''; width: 11px; height: 9px; background: var(--gold); --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5.2 4.3 8.5 11 1.5' fill='none' stroke='black' stroke-width='2.2'/%3E%3C/svg%3E");
  -webkit-mask: var(--tick) center / contain no-repeat; mask: var(--tick) center / contain no-repeat; }
.msn-title { margin: 0; font: 700 32px/1.04 var(--font-d); font-stretch: condensed; letter-spacing: 4px; text-transform: uppercase; color: #f8f3e9; text-shadow: 0 2px 0 #000, 0 0 26px rgba(0, 0, 0, .9); }
.msn-blurb { margin: 0; max-width: 680px; color: #ddd7cb; font-size: 14px; line-height: 1.5; text-shadow: 0 1px 3px #000, 0 0 12px rgba(0, 0, 0, .7); }
/* the map as a radar in the frame's corner (a minimap, as in the battle) */
.msn-map { position: absolute; z-index: 3; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 4px; padding: 6px 6px 5px; border-radius: 4px;
  background: rgba(7, 8, 10, .84); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .09), 0 0 0 1px #000, 0 8px 18px rgba(0, 0, 0, .6); }
.msn-map .cap { font-size: 9.5px; letter-spacing: 1.4px; }
.msn-preview { display: block; width: var(--radar); height: var(--radar); image-rendering: pixelated; border: 1px solid #2c3137; border-radius: 2px; background: #0c0d0f; box-shadow: inset 0 0 12px #000; }
.msn-map .msn-map-cap { max-width: var(--radar); font-size: 10.5px; line-height: 1.25; color: var(--t3); }  /* (a long biome's name takes a second line) */

/* the missions: a strip of film frames, sprocket marks along its edges; a frame wears its mission's picture, the number (a
   done one's tick) and best time on its top row, the title (two lines at most) at its foot, its segment of progress under
   it as on the carousel (gold: done; the campaign's colour: open) and the campaign's colour round the one chosen */
.msn-strip { position: relative; padding: 9px; border-radius: 5px; background: #08090b; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05), 0 6px 14px rgba(0, 0, 0, .45); }
.msn-strip::before, .msn-strip::after { content: ''; position: absolute; left: 10px; right: 10px; height: 3px; border-radius: 1px; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .11) 0 7px, transparent 7px 15px); }
.msn-strip::before { top: 3px; }
.msn-strip::after { bottom: 3px; }
.msn-list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.msn-list button { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 2px 6px; height: var(--tile-h); min-width: 0; padding: 6px 8px 9px 7px; text-align: left; letter-spacing: 0; opacity: 1; border: 1px solid #000; border-radius: 4px;
  background: #121418; box-shadow: 0 0 0 1px rgba(255, 255, 255, .13), 0 4px 10px rgba(0, 0, 0, .55); transition: box-shadow .18s, transform .18s; }
.msn-list button:active { transform: none; }
.msn-list button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }  /* (the keys' frame told from the chosen one's ring) */
.msn-th { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: #121418; }
.msn-th img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; filter: saturate(.8) brightness(.72); transition: transform .3s, filter .3s; }
.msn-th::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5, 5, 7, .94), rgba(5, 5, 7, .55) 55%, rgba(5, 5, 7, .1)); }
.msn-list button i { grid-area: 1 / 1; justify-self: start; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; font: 700 11px/20px Consolas, monospace; font-style: normal;
  text-align: center; color: #fff; background: rgba(0, 0, 0, .72); box-shadow: 0 0 0 1px rgba(255, 255, 255, .22); }
/* (the title's clip box: room above and under its lines for the accents over capitals and the tails - Ó, Ż, Ś, Ę - as the
   action bar's captions, docs/NAVIGATION.md 1; the negative margin keeps its place) */
.msn-list button b { grid-area: 3 / 1 / 4 / 4; padding: .25em 0 .12em 2px; margin-block: -.25em -.12em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
  font: 700 12.5px/1.16 var(--font-d); font-stretch: semi-condensed; letter-spacing: 1px; text-transform: uppercase; color: #ece8df; text-shadow: 0 1px 2px #000; }
.msn-list button em { grid-area: 1 / 3; font: 700 11px/20px Consolas, monospace; font-style: normal; color: var(--gold); text-shadow: 0 1px 2px #000; }
.msn-list button::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: color-mix(in srgb, var(--cc) 55%, #1b1e22); }
.msn-list button.done::after { background: var(--gold); box-shadow: 0 0 8px rgba(240, 200, 80, .5); }
.msn-list button.done i { color: #1d1606; background: var(--gold); box-shadow: 0 0 6px rgba(240, 200, 80, .55); }
.msn-list button.on { box-shadow: 0 0 0 1px #000, 0 0 0 2px color-mix(in srgb, var(--cc) 60%, #fff), 0 0 16px color-mix(in srgb, var(--cc) 55%, transparent), 0 4px 10px rgba(0, 0, 0, .6); }
.msn-list button.on .msn-th img { filter: none; }
.msn-list button.on:not(.done)::after { background: var(--cc); box-shadow: 0 0 10px var(--cc); }
.msn-list button.on:not(.done) i { background: color-mix(in srgb, var(--cc) 75%, #000); }
@media (hover: hover) {
  .msn-list button:not(.locked):hover { background: #121418; box-shadow: 0 0 0 1px color-mix(in srgb, var(--cc) 70%, #fff), 0 6px 14px rgba(0, 0, 0, .7); }
  .msn-list button.on:hover { box-shadow: 0 0 0 1px #000, 0 0 0 2px color-mix(in srgb, var(--cc) 60%, #fff), 0 0 20px color-mix(in srgb, var(--cc) 65%, transparent); }
  .msn-list button:not(.locked):hover .msn-th img { transform: scale(1.06); filter: none; }
}
/* a locked one: no picture - dark hatched steel, a lock, its title dim (unspoiled, as the list always was) */
.msn-list button.locked { cursor: default; box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 4px 10px rgba(0, 0, 0, .5); }
.msn-list button.locked .msn-th { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .03) 0 2px, transparent 2px 9px), linear-gradient(#17191d, #0c0d0f); }
.msn-list button.locked .msn-th::after, .msn-list button.locked::after { display: none; }
.msn-list button.locked i { color: transparent; background: rgba(0, 0, 0, .55) center / 10px 10px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23a39d90' fill-rule='evenodd' d='M4 7V5a4 4 0 0 1 8 0v2h1.5v8h-11V7zm2 0h4V5a2 2 0 0 0-4 0z'/%3E%3C/svg%3E");
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.msn-list button.locked b { color: var(--t4); text-shadow: none; }

/* the objectives known at the start: one row, its list scrolls in place (menu.css draws the items, as in the briefing) */
.msn-objs { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 4px 18px; padding: 9px 14px; border-radius: 4px;
  background: linear-gradient(rgba(255, 255, 255, .025), rgba(255, 255, 255, .01)); box-shadow: inset 0 0 0 1px var(--line); }
.msn-objs > .cap { padding-top: 2px; white-space: nowrap; color: var(--gold); opacity: .85; }
.msn-objs ul { margin: 0; height: var(--objs-h); overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; }
.msn-objs ul.more { -webkit-mask: linear-gradient(#000 calc(100% - 14px), transparent); mask: linear-gradient(#000 calc(100% - 14px), transparent); }  /* (more under it) */

/* the dock's row over the action bar: the difficulty at its left end, the saves at its right (over the action) */
.msn-foot { flex-wrap: nowrap; align-items: stretch; margin-bottom: 8px; }
.msn-diff { display: flex; align-items: center; gap: 10px; min-width: 0; }
.msn-diff .cap { white-space: nowrap; }
.msn-diff .dd { width: auto; min-width: 150px; }
.msn-saves { display: flex; gap: 8px; min-width: 0; }
.msn-saves:empty { display: none; }
.msn-saves button { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-width: 0; height: 34px; padding: 0 12px; text-align: left; letter-spacing: 0; line-height: 1.15; }
.msn-saves button b { font-size: 12px; white-space: nowrap; }
.msn-saves button small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--t3); font: 10.5px "Segoe UI", Tahoma, sans-serif; }
.msn-saves .wait { color: #fa6; }
body.touch :is(.msn-saves button, .msn-diff .dd) { height: 44px; min-height: 44px; }

/* a low window (1366 x 768 and lower): the campaign's line goes, the texts tighter, the frame and the tiles lower */
@media (min-width: 1001px) and (max-height: 860px) {
  .msn-view { --objs-h: clamp(38px, calc(100vh - 728px), 72px); --stage-h: clamp(220px, calc(100vh - 392px - var(--objs-h)), 560px); --tile-h: 66px; --radar: 112px; }
  .msn-top .msn-sub { display: none; }
  .msn-stage { padding: 16px 22px; }
  .msn-top .msn-cap { font-size: 21px; }
  .msn-cap img { width: 34px; height: 34px; }
  .msn-title { font-size: 27px; letter-spacing: 3px; }
  .msn-blurb { font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .msn-objs { padding: 7px 12px; }
  .msn-list button { row-gap: 1px; padding-top: 5px; padding-bottom: 7px; }  /* (a two-line title whole in a 64 px frame - "The Gates to the Fields") */
  .msn-list button b { line-height: 1.1; }
}
@media (min-width: 1001px) and (max-height: 760px) {
  .msn-view { --objs-h: 38px; --stage-h: clamp(210px, calc(100vh - 422px), 560px); --tile-h: 64px; --radar: 100px; }
  .msn-main { gap: 4px; }
  .msn-map { right: 14px; bottom: 14px; }
}

/* ---------------- narrower screens */
@media (max-width: 1000px) {  /* (the rail on top: at 1000x700 the stage still ends above the fold, its button in sight) */
  .cc { --cc-h: clamp(360px, min(calc(100vh - 470px), 64cqw), 560px); }
  .msn-view { --objs-h: 54px; --stage-h: clamp(260px, min(58vw, calc(100vh - 746px)), 456px); --tile-h: 70px; }  /* (a portrait iPad - 820 x 1180, 744 x 1133, 768 x 1024: the whole select without scrolling) */
}
@media (max-width: 1000px) and (max-height: 1100px) {  /* (a lower frame - 768 x 1024: the campaign's line goes, the radar smaller) */
  .msn-view { --radar: 112px; }
  .msn-top .msn-sub { display: none; }
}
@media (max-width: 720px) {
  .cc-card { gap: 12px; }
  .cc-top { padding: 16px 20px 0; }
  .cc-body { padding: 0 20px 22px; }
  .cc-emb { width: 56px; height: 56px; }
  .cc-title { font-size: 30px; letter-spacing: 3px; }
  .cc-blurb { font-size: 13px; }
  .cc-foot { flex-wrap: wrap; }
  .cc-strip { gap: 6px; }
  .cc-m { width: 64px; min-width: 48px; }
  .cc-act { width: 100%; align-items: stretch; }
  .cc-act > .ab { width: 100%; }
  .cc-arrow { top: 96px; width: 40px; height: 72px; margin-top: 0; }
  .cc-arrow.prev { left: 10px; }
  .cc-arrow.next { right: 10px; }
  .cc-index button { width: 32px; height: 32px; }
  .cc-index img { width: 24px; height: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .cc, #panel-campaign::before { transition: none; }
  .cc-m, .cc-m img, .cc-arrow, .cc-arrow svg, .cc-index img { transition: none; }
  .msn-art img { animation: none; }
  .msn-list button, .msn-th img { transition: none; }
}
