/* Battle Lines: the auto-battler screen (src/lines/view.js).

   A war room. The field is a sand table in the middle, leaning away from the
   eye, with the units standing up on it. The bonuses are on the left, the
   other commanders on the right, and the depot runs along the bottom with the
   one big button. Everything is sized from --cell, which view.js fits to the
   window; --tilt is how far the table leans. */

#lines {
  --cell: 64px;
  --tilt: 52deg;
  --big: 1.1;                    /* units stand larger than their square (BIG in scene.js) */
  --ui: 1;                       /* how big the panels are drawn; view.js sets it from the window */
  --steel-1: #34383d; --steel-2: #1c1e22; --steel-3: #101113;
  --olive: #55633a; --mine: #6fb7ff; --foe: #e2513a;
  position: fixed; inset: 0; z-index: 105; width: 100vw;
  display: grid; grid-template: calc(52px * var(--ui)) 1fr auto / calc(236px * var(--ui)) 1fr calc(256px * var(--ui));
  grid-template-areas: "top top top" "traits main side" "shop shop shop";
  background:
    radial-gradient(ellipse 70% 60% at 50% 42%, rgba(255, 236, 170, .1), transparent 70%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 48px),
    radial-gradient(ellipse at 50% 40%, #262b21 0%, #0d0f0b 78%);
  color: var(--text); font-family: var(--f-ui); font-size: 13px;
  user-select: none; -webkit-user-select: none; overflow: hidden;
}
#lines h4 {
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
  font: 600 11px var(--f-head); letter-spacing: .2em; text-transform: uppercase; color: var(--brass);
}
/* Over snow or sand the headings and hints need their own dark to be read against. */
#lines.gl :is(.bl-traits, .bl-side) h4 { padding: 3px 0 3px 8px; margin-left: -8px; border-radius: 3px; background: linear-gradient(90deg, rgba(10, 10, 8, .72), rgba(10, 10, 8, .3) 70%, transparent); text-shadow: 0 1px 2px #000; }
#lines.gl .bl-hint { padding: 6px 8px; border-radius: 3px; background: rgba(10, 10, 8, .6); }
#lines.gl .bl-itslot { background: rgba(0, 0, 0, .5); border-color: rgba(255, 255, 255, .3); }
#lines h4::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--brass-dim), transparent); }
#lines .bl-hint { margin: 0; font-size: 12px; line-height: 1.45; color: var(--text-dim); }
#lines .flag { box-shadow: 0 0 0 1px rgba(0, 0, 0, .7); vertical-align: -2px; flex: none; }
#lines .ic svg { width: 1em; height: 1em; display: block; }
#lines .ic { display: inline-flex; }
#lines button { font-family: var(--f-ui); }

/* The panels are laid out once, at the sizes below, and drawn larger on a larger screen. */
.bl-top, .bl-traits, .bl-side, .bl-shop, .bl-over, .bl-benchhead, .bl-toasts { zoom: var(--ui); }

/* ---------------------------------------------------------- the 3D field
   Where WebGL is to be had, scene.js draws the ground, the woods and the units
   on a canvas behind everything (#lines.gl). The board of squares stays where
   it is, unseen, for the pointer; what it carried is drawn in the scene. */
.bl-gl { position: absolute; inset: 0; z-index: -1; display: block; width: 100%; height: 100%; }
#lines.gl::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 75% at 50% 46%, transparent 52%, rgba(6, 8, 5, .62) 100%),
    linear-gradient(90deg, rgba(8, 10, 7, .8), transparent 24%, transparent 76%, rgba(8, 10, 7, .8));
}
#lines.gl .bl-board { background: none; box-shadow: none; }
#lines.gl .bl-board::after, #lines.gl .bl-boardwrap::before { display: none; }
#lines.gl .bl-cell::before { opacity: 0; }
#lines.gl.dragging.drag-unit .bl-cell.own::before { opacity: 1; }
#lines.gl .bl-board .bl-u img, #lines.gl .bl-board .bl-base { visibility: hidden; animation: none; }
#lines.gl.dragging.drag-item .bl-board .bl-u.mine .bl-fig { outline: 2px dashed rgba(255, 249, 191, .85); outline-offset: -4px; border-radius: 8px; }
#lines.gl .bl-trait.off, #lines.gl .bl-row { background-color: rgba(14, 15, 13, .55); }

/* ------------------------------------------------------------------- top */
.bl-top {
  grid-area: top; position: relative; z-index: 4; display: flex; align-items: center; gap: 12px; padding: 0 12px;
  background: linear-gradient(180deg, var(--steel-1), var(--steel-2)); border-bottom: 1px solid #000;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .1), inset 0 -2px 0 rgba(201, 169, 73, .35);
}
.bl-exit, .bl-speed, .bl-help, .bl-set {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; cursor: pointer;
  font: 600 12px var(--f-head); letter-spacing: .1em; text-transform: uppercase; color: #d9d3bd;
  background: linear-gradient(180deg, #4b4f55, #2b2e33); border: 1px solid #000; border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 1px 2px rgba(0, 0, 0, .5);
}
.bl-exit:hover, .bl-speed:hover, .bl-help:hover, .bl-set:hover { filter: brightness(1.25); color: #fff; }
.bl-speed { min-width: 42px; justify-content: center; font-variant-numeric: tabular-nums; }

/* The stage: a plate hung from the bar, with a pip for each round of it. */
.bl-stage {
  position: absolute; left: 50%; top: 0; translate: -50% 0; min-width: 380px; height: 66px; padding: 7px 34px 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: linear-gradient(180deg, #3d4147, #1d1f23);
  clip-path: polygon(0 0, 100% 0, 100% 60%, calc(100% - 22px) 100%, 22px 100%, 0 60%);
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .7));
}
/* The plate folds away to the round alone (view.js act 'stage'), and comes back. */
.bl-fold { position: absolute; right: 22px; top: 3px; width: 32px; height: 28px; padding: 0; font: 700 13px/1 var(--f-head); color: #c9c3ad; background: rgba(0, 0, 0, .35); border: 0; border-radius: 3px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.bl-fold:hover { color: #fff3a8; background: rgba(0, 0, 0, .6); }
.bl-stage { transition: height .18s ease-out, min-width .18s ease-out; }
#lines.stage-min:not(.narrow) .bl-stage { height: 34px; min-width: 230px; padding: 8px 56px 0 30px; }
#lines.stage-min:not(.narrow) :is(.bl-pips, .bl-foe) { display: none; }
#lines.narrow .bl-fold { display: none; }
/* The commander is hit: his health flares and jolts as it runs down. */
.bl-home > span.hit { animation: bl-hphit .7s ease-out; }
.bl-home > span.hit b { color: #ff9a8a; }
@keyframes bl-hphit { 0% { transform: scale(1.25); background: rgba(214, 60, 40, .85); box-shadow: 0 0 22px rgba(240, 90, 60, .9); } 20% { transform: translateX(-5px) scale(1.15); } 40% { transform: translateX(4px) scale(1.08); } 60% { transform: translateX(-2px); } }
.bl-clock { position: absolute; left: 22px; right: 22px; bottom: 0; height: 4px; background: #000; overflow: hidden; }
.bl-clock b { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #c9a949, #fff3a8); transition: width .2s linear; }
.bl-clock.low b { background: linear-gradient(90deg, #b83a26, #f07a62); }
.bl-clock.off b { background: var(--brass-dim); transition: none; }
.bl-clock.in { position: relative; left: 0; right: 0; width: 60%; margin: 0 auto 26px; border-radius: 2px; }
.bl-secs { min-width: 18px; font: 700 14px var(--f-head); font-style: normal; text-align: right; color: var(--gold); font-variant-numeric: tabular-nums; }
.bl-secs.low { color: #f07a62; }
.bl-secs:empty { display: none; }
.bl-round { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.bl-round b { font: 700 19px/1 var(--f-head); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.bl-pips { display: inline-flex; align-items: center; gap: 5px; }
.bl-pip {
  position: relative; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; font-size: 12px; font-style: normal;
  color: #8a8b84; background: #17181b; border: 1px solid #55585c; border-radius: 50%;
}
.bl-pip + .bl-pip::before { content: ''; position: absolute; right: 100%; top: 50%; width: 6px; height: 1px; background: #55585c; }
.bl-pip.pve { border-radius: 5px; }
.bl-pip.done { color: #cfd2c8; background: #2d3035; }
.bl-pip.done.w { color: #0f1a0b; background: linear-gradient(#9be06c, #5fa53b); border-color: #1d3a10; }
.bl-pip.done.l { color: #260905; background: linear-gradient(#f07a62, #b83a26); border-color: #4a120a; }
.bl-pip.done.d { color: #1f1f1f; background: linear-gradient(#d0d0c8, #8f8f88); }
.bl-pip.now { width: 28px; height: 28px; font-size: 15px; color: #241d0c; background: linear-gradient(#fff3a8, #c9a949); border-color: #fff9bf; box-shadow: 0 0 10px rgba(255, 226, 122, .8); animation: bl-now 1.6s ease-in-out infinite alternate; }
.bl-pip s { position: absolute; left: -3px; top: -3px; width: 8px; height: 8px; border-radius: 2px; background: #9be06c; box-shadow: 0 0 0 1px #000; }
.bl-pip u { position: absolute; right: -3px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #6fb7ff; box-shadow: 0 0 0 1px #000; }
@keyframes bl-now { to { box-shadow: 0 0 16px 2px rgba(255, 226, 122, 1); } }
.bl-foe { display: flex; align-items: center; gap: 8px; max-width: 100%; font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.bl-foe em { padding: 1px 7px; font: 600 10px var(--f-head); font-style: normal; letter-spacing: .16em; text-transform: uppercase; color: #cfe0b4; background: rgba(120, 160, 70, .28); border-radius: 2px; }
.bl-foe.hot em { color: #ffd0c4; background: rgba(214, 60, 40, .45); }
.bl-foe span { overflow: hidden; text-overflow: ellipsis; color: var(--text); }

.bl-home { margin-left: auto; }
.bl-home > span { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; font-size: 16px; color: #ef8a72; background: rgba(0, 0, 0, .35); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.bl-home b { font: 700 19px var(--f-head); color: #fff; min-width: 28px; text-align: right; font-variant-numeric: tabular-nums; }
.bl-hpbar { display: block; width: 120px; height: 10px; background: #000; border-radius: 2px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.bl-hpbar b { display: block; height: 100%; min-width: 0; background: linear-gradient(180deg, #f07a62, #a5301f); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); transition: width .5s; }

/* ---------------------------------------------------------------- traits */
.bl-traits { grid-area: traits; padding: 26px 8px 8px 14px; overflow-y: auto; }
.bl-trait {
  display: flex; align-items: center; gap: 7px; height: 44px; margin-bottom: 6px; padding-right: 8px;
  background: linear-gradient(90deg, rgba(20, 21, 23, .9), rgba(20, 21, 23, .45)); border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); color: var(--text-dim);
}
/* The mark is a cloth patch, cut like a shield, in the metal of the tier reached. */
.bl-tmark {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 38px; height: 44px; padding-bottom: 5px; font-size: 18px;
  color: #b4b4ac; background: linear-gradient(160deg, #4a4d51, #2a2c2f);
  clip-path: polygon(0 0, 100% 0, 100% 66%, 50% 100%, 0 66%);
}
.bl-trait.on .bl-tmark { color: #2b1706; background: linear-gradient(160deg, #e2a25e, #8a5324); }
.bl-trait.mid .bl-tmark { color: #1b2026; background: linear-gradient(160deg, #f1f5f8, #8d98a2); }
.bl-trait.top .bl-tmark { color: #2e2104; background: linear-gradient(160deg, #fff3a8, #d09a25); }
.bl-trait.on, .bl-trait.mid, .bl-trait.top { color: var(--text); }
.bl-trait.on { box-shadow: inset 0 0 0 1px rgba(226, 162, 94, .45); }
.bl-trait.mid { box-shadow: inset 0 0 0 1px rgba(210, 222, 232, .5); }
.bl-trait.top { box-shadow: inset 0 0 0 1px rgba(255, 226, 122, .7), 0 0 12px rgba(255, 226, 122, .22); background: linear-gradient(90deg, rgba(70, 56, 16, .9), rgba(20, 21, 23, .5)); }
.bl-tcount { flex: none; width: 24px; height: 24px; font: 700 15px/24px var(--f-head); text-align: center; color: #fff; background: rgba(0, 0, 0, .55); border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); font-variant-numeric: tabular-nums; }
.bl-trait.off .bl-tcount { color: var(--text-dim); }
.bl-tbody { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.bl-tname { font: 600 13px var(--f-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-tsteps { display: flex; gap: 3px; font: 600 11px var(--f-head); color: #6f7068; }
.bl-tsteps i { font-style: normal; }
.bl-tsteps i + i::before { content: '›'; margin-right: 3px; color: #55564f; }
.bl-tsteps i.hit { color: #a9a48e; }
.bl-tsteps i.at { color: var(--gold); }
/* Bonuses not yet working: small marks, so the ones that are working stand out. */
.bl-toff { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.bl-trait.chip { height: 30px; margin: 0; padding-right: 7px; gap: 5px; opacity: .85; }
.bl-trait.chip .bl-tmark { width: 26px; height: 30px; padding-bottom: 4px; font-size: 13px; }
.bl-trait.chip .bl-tcount { width: auto; height: auto; font-size: 12px; line-height: 1; background: none; box-shadow: none; }
.bl-tcount i { font-style: normal; opacity: .55; }

/* ------------------------------------------------------------- the field */
/* Two fingers on the field zoom it (view.js pinch), so the browser must not take the gesture for itself.
   The rows that scroll sideways, and the sheets that scroll down, keep their own. */
#lines { touch-action: none; }
#lines :is(.bl-traits, .bl-side) { touch-action: pan-x; }
#lines .bl-over { touch-action: pan-y; }
/* A heavy blow jolts the field and the picture under it together (view.js shake). */
#lines.shake :is(.bl-gl, .bl-boardwrap) { animation: bl-shake .3s ease-out; }
@keyframes bl-shake {
  0% { translate: 0 0; } 15% { translate: calc(var(--shake) * -1) var(--shake); } 35% { translate: var(--shake) calc(var(--shake) * -.6); }
  55% { translate: calc(var(--shake) * -.5) calc(var(--shake) * .4); } 80% { translate: calc(var(--shake) * .25) 0; } 100% { translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) { #lines.shake :is(.bl-gl, .bl-boardwrap) { animation: none; } }
.bl-zoom { position: absolute; right: 10px; bottom: 8px; z-index: 4; display: flex; gap: 4px; zoom: var(--ui); }
.bl-zoom button {
  width: 32px; height: 32px; cursor: pointer; font: 700 19px/1 var(--f-head); color: var(--bone, #c5bea8);
  background: linear-gradient(180deg, var(--steel-1), var(--steel-3)); border: 1px solid #000; border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 2px 5px rgba(0, 0, 0, .6);
}
.bl-zoom button:hover { color: #fff; filter: brightness(1.25); }
#lines.narrow .bl-zoom { right: 6px; bottom: auto; top: 4px; }
#lines.narrow .bl-zoom button { width: 36px; height: 36px; }
/* The notices over the field keep their own size however far it is zoomed. */
.bl-toasts, .bl-scout, .bl-banner { scale: calc(1 / var(--zoom, 1)); }
.bl-main { grid-area: main; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 0; padding-top: 2px; }
/* The table leans --tilt away, seen from a little way off. It hinges on its
   near edge, so the far ranks shrink: sixteen ranks stand about five squares
   high, and the wrap leaves room above them for the units in the far rank. */
.bl-boardwrap {
  position: relative; width: calc(var(--cell) * 7); height: calc(var(--cell) * 5.2); flex: none;
  transform: translate(var(--panx, 0px), var(--pany, 0px)) scale(var(--zoom, 1)); transform-origin: 50% 100%;       /* view.js setZoom */
  perspective: calc(var(--cell) * 24); perspective-origin: 50% 100%;
}
.bl-boardwrap::before {
  content: ''; position: absolute; left: -6%; right: -6%; bottom: calc(var(--cell) * -.12); height: calc(var(--cell) * .9);
  background: radial-gradient(ellipse, rgba(0, 0, 0, .75), transparent 68%);
}
.bl-board {
  position: absolute; left: 0; bottom: calc(var(--cell) * .3); width: calc(var(--cell) * 7); height: calc(var(--cell) * 8);
  transform-origin: 50% 100%; transform: rotateX(var(--tilt)); transform-style: preserve-3d;
  box-shadow: 0 0 0 6px #37352a, 0 0 0 8px #0b0b08;
  background:
    linear-gradient(180deg, transparent 49.7%, rgba(255, 233, 150, .95) 49.7%, rgba(255, 233, 150, .95) 50.3%, transparent 50.3%),
    linear-gradient(180deg, rgba(120, 30, 18, .5) 0%, rgba(92, 28, 20, .22) 50%, rgba(40, 62, 26, .12) 50%, rgba(40, 62, 26, .3) 100%),
    linear-gradient(180deg, rgba(8, 9, 6, .78), rgba(18, 20, 14, .34) 60%, rgba(18, 20, 14, .2)),
    url(../../assets/img-e0af07af/ter_plains.webp) center/cover;
}
/* The near face of the table: the slab it is cut from. */
.bl-board::after {
  content: ''; position: absolute; left: -8px; right: -8px; top: calc(100% + 8px); height: calc(var(--cell) * .3);
  transform-origin: 50% 0; transform: rotateX(-90deg);
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(var(--cell) - 1px), rgba(0, 0, 0, .35) calc(var(--cell) - 1px) var(--cell)),
    linear-gradient(180deg, #5a5643, #2a281e 30%, #14130d);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .16);
}
.bl-cells { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(7, var(--cell)); grid-auto-rows: var(--cell); transform-style: preserve-3d; }
/* The squares lie in the same plane as the board and the grid that holds them, and a browser asked what is
   under the pointer may name any of the three. Only the squares answer, and a unit stands a hair above its square. */
.bl-board, .bl-cells { pointer-events: none; }
.bl-cell { position: relative; transform-style: preserve-3d; pointer-events: auto; }
.bl-cells .bl-u { transform: translateZ(1px); }
.bl-cell::before {
  content: ''; position: absolute; inset: 3.5%; border-radius: 9%;
  background: rgba(0, 0, 0, .1); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3);
}
.bl-cell.own::before { background: rgba(255, 255, 255, .045); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .13), inset 0 0 calc(var(--cell) * .2) rgba(0, 0, 0, .25); }
.bl-cell.own.front::before { box-shadow: inset 0 0 0 1px rgba(255, 233, 150, .3), inset 0 0 calc(var(--cell) * .2) rgba(0, 0, 0, .25); }
#lines.dragging.drag-unit .bl-cell.own::before { background: rgba(255, 249, 191, .1); box-shadow: inset 0 0 0 1px rgba(255, 249, 191, .55); }
#lines.dragging.drag-unit .bl-cell.own.aim::before { background: rgba(255, 249, 191, .34); box-shadow: inset 0 0 0 2px #fff9bf, 0 0 14px rgba(255, 249, 191, .5); }
/* The square a unit was taken up from is not left lit behind it. */
#lines.dragging.drag-unit .bl-cell.own:not(.aim):has(> .bl-u.lifted)::before { background: rgba(255, 249, 191, .1) !important; box-shadow: inset 0 0 0 1px rgba(255, 249, 191, .55) !important; }
#lines.dragging.drag-unit .bl-slot { box-shadow: inset 0 0 0 1px rgba(255, 249, 191, .5); }
#lines.dragging.drag-unit .bl-slot.aim { background: rgba(255, 249, 191, .22); }
/* While something is carried, the standing figures are not in the way of the squares behind them. */
#lines.dragging .bl-fig { pointer-events: none; }
.bl-board.fighting .bl-cells .bl-u { display: none; }
.bl-layer, .bl-fxl { position: absolute; inset: 0; pointer-events: none; transform-style: preserve-3d; }
.bl-fxl { transform: translateZ(1px); }
.bl-layer .bl-u { position: absolute; left: 0; top: 0; width: var(--cell); height: var(--cell); transition: transform .42s linear; pointer-events: auto; cursor: default; }
.bl-layer .bl-u.dead { pointer-events: none; }
/* Equipment in hand during a battle: the player's own units take it. */
#lines.dragging.drag-item .bl-layer .bl-u.side0:hover .bl-fig { filter: drop-shadow(0 0 7px #fff3a8); }
.bl-layer .bl-u.jump { transition: transform .18s ease-out; }

/* A unit: a base on the ground, and on it the figure with its flag, stars,
   equipment and bars. On the field the figure stands upright, facing the eye;
   on the bench it lies in its slot like a card. */
.bl-u { position: relative; display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; transform-style: preserve-3d; }
.bl-fig { position: absolute; inset: 0; display: block; transition: opacity .45s; }
.bl-base { display: none; }
.bl-u img { position: absolute; left: 6%; top: 2%; width: 88%; height: 88%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .7)); }
.bl-u.mine img, .bl-u.side0 img { transform: scaleX(-1); }
.bl-u.s2 img { filter: drop-shadow(0 0 5px rgba(160, 200, 255, .9)) drop-shadow(0 3px 3px rgba(0, 0, 0, .7)); }
.bl-u.s3 img { filter: drop-shadow(0 0 7px rgba(255, 220, 110, 1)) drop-shadow(0 3px 3px rgba(0, 0, 0, .7)); }

.bl-board .bl-fig { transform-origin: 50% 78%; transform: rotateX(calc(var(--tilt) * -1)) scale(var(--big)); }
.bl-board .bl-u img { left: 0; top: auto; bottom: 22%; width: 100%; height: 100%; object-position: 50% 100%; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .8)); }
.bl-board .bl-u img { transform-origin: 50% 100%; animation: bl-idle 2.4s ease-in-out infinite alternate; }
.bl-layer .bl-u img { transition: rotate .45s ease-in, translate .45s ease-in; }
@keyframes bl-idle { to { scale: 1 1.035; } }
@keyframes bl-walk { from { rotate: -3deg; } to { rotate: 3deg; translate: 0 -5%; } }
@keyframes bl-castring { 30% { scale: 1.55; filter: brightness(2.4); } }
.bl-board .bl-u.air .bl-fig { transform: translateZ(calc(var(--cell) * .78)) rotateX(calc(var(--tilt) * -1)) scale(var(--big)); }
.bl-board .bl-base {
  display: block; position: absolute; left: 15%; top: 17%; width: 70%; aspect-ratio: 1; border-radius: 50%; transition: opacity .45s;
  background: radial-gradient(circle, rgba(0, 0, 0, .55) 0 46%, rgba(111, 183, 255, .28) 47% 62%, transparent 64%);
  box-shadow: inset 0 0 0 2px var(--mine), 0 0 calc(var(--cell) * .12) rgba(111, 183, 255, .6);
}
.bl-board .bl-u.side1 .bl-base, .bl-board .bl-u.preview .bl-base {
  background: radial-gradient(circle, rgba(0, 0, 0, .55) 0 46%, rgba(226, 81, 58, .3) 47% 62%, transparent 64%);
  box-shadow: inset 0 0 0 2px var(--foe), 0 0 calc(var(--cell) * .12) rgba(226, 81, 58, .6);
}
.bl-board .bl-u.s2 .bl-base { outline: 2px solid rgba(207, 228, 255, .75); outline-offset: 2px; }
.bl-board .bl-u.s3 .bl-base { outline: 2px solid rgba(255, 226, 122, .95); outline-offset: 2px; }
.bl-u.preview { cursor: default; }
.bl-u.preview .bl-fig, .bl-u.preview .bl-base { opacity: .6; }
.bl-u.lifted .bl-fig, .bl-u.lifted .bl-base { opacity: .22; }
.bl-board .bl-u.sel .bl-base { box-shadow: inset 0 0 0 3px #fff9bf, 0 0 calc(var(--cell) * .25) rgba(255, 249, 191, .95); }
.bl-slot .bl-u.sel::before { content: ''; position: absolute; inset: 3px; border: 2px solid var(--gold); border-radius: 4px; box-shadow: 0 0 10px rgba(255, 249, 191, .6); }

.bl-uflag { position: absolute; left: 3px; top: 3px; line-height: 0; }
/* The units a piece of equipment suits, while it is in hand. */
.bl-u.fit .bl-fig { filter: drop-shadow(0 0 6px #9be06c) drop-shadow(0 0 2px #9be06c); }
.bl-slot:has(.bl-u.fit) { box-shadow: inset 0 0 0 2px #9be06c, inset 0 0 14px rgba(155, 224, 108, .5); }
/* The units a bonus counts, while the pointer is on that bonus. */
.bl-u.hl .bl-fig { filter: drop-shadow(0 0 6px #fff3a8) drop-shadow(0 0 2px #fff3a8); }
.bl-card.hl { box-shadow: 0 0 0 2px #fff3a8, 0 0 18px rgba(255, 243, 168, .75) !important; transform: translateY(-5px); filter: brightness(1.12); }
#lines:has(.bl-card.hl) .bl-card:not(.hl):not(.empty) { filter: brightness(.6) saturate(.7); }
.bl-cell:has(> .bl-u.hl)::before { background: rgba(255, 243, 168, .28) !important; box-shadow: inset 0 0 0 2px #fff3a8, 0 0 16px rgba(255, 243, 168, .55) !important; }
.bl-slot:has(.bl-u.hl) { box-shadow: inset 0 0 0 2px #fff3a8, inset 0 0 14px rgba(255, 243, 168, .5); }
/* Rank and kit must read at a glance, on the bench as on the field: the slot of a promoted unit is edged in
   the metal of its rank, its stars are large, and what it carries sits in the corner as plates. */
.bl-slot:has(.bl-u.s2) { box-shadow: inset 0 0 0 2px rgba(207, 228, 255, .8), inset 0 0 12px rgba(160, 200, 255, .35); }
.bl-slot:has(.bl-u.s3) { box-shadow: inset 0 0 0 2px rgba(255, 226, 122, .95), inset 0 0 14px rgba(255, 226, 122, .45); }
.bl-slot .bl-stars { bottom: 2px; font-size: calc(var(--cell) * .23); -webkit-text-stroke: .6px rgba(0, 0, 0, .8); }
.bl-slot .bl-uits { right: 3px; top: 3px; gap: 2px; }
.bl-slot .bl-uits i { width: calc(var(--cell) * .27); height: calc(var(--cell) * .27); min-width: 14px; min-height: 14px; font-size: calc(var(--cell) * .19); border-radius: 3px; }
.bl-stars { position: absolute; left: 0; right: 0; bottom: 1px; text-align: center; font-style: normal; font-size: calc(var(--cell) * .17); line-height: 1; letter-spacing: 1px; color: #c9a36a; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.bl-stars.s2 { color: #cfe4ff; }
.bl-stars.s3 { color: #ffe27a; }
.bl-uits { position: absolute; right: 2px; top: 2px; display: flex; flex-direction: column; gap: 1px; }
.bl-uits i { display: flex; align-items: center; justify-content: center; width: calc(var(--cell) * .2); height: calc(var(--cell) * .2); min-width: 11px; min-height: 11px; font-size: calc(var(--cell) * .14); color: #241d0c; background: linear-gradient(#ecd47f, #c9a949); border-radius: 2px; box-shadow: 0 0 0 1px #000; }
.bl-bars { position: absolute; left: 14%; right: 14%; top: -3px; display: flex; flex-direction: column; gap: 1px; }
.bl-bars i { position: relative; display: block; height: 6px; background: rgba(0, 0, 0, .85); border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px #000; }
.bl-bars .mp { height: 3px; }
.bl-bars b { display: block; height: 100%; width: 100%; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
/* Standing up, the figure wears these around itself: bars over the head, stars and kit at the feet. */
.bl-board .bl-bars { top: -26%; }
.bl-board .bl-uflag { left: -2%; top: -27%; }
.bl-board .bl-stars { bottom: auto; top: calc(-26% - var(--cell) * .28); font-size: calc(var(--cell) * .25); -webkit-text-stroke: .6px rgba(0, 0, 0, .8); }
.bl-board .bl-uits { flex-direction: row; justify-content: center; left: 0; right: 0; top: calc(-26% + 12px); gap: 2px; }
.bl-board .bl-uits i { width: calc(var(--cell) * .28); height: calc(var(--cell) * .28); min-width: 14px; min-height: 14px; font-size: calc(var(--cell) * .2); border-radius: 3px; box-shadow: 0 0 0 1px #000, 0 2px 4px rgba(0, 0, 0, .6); }
/* The plate over a unit on the field. It stands up like the figure but is not enlarged with it, so it
   is never wider than the unit's own square and does not run into its neighbours: flag and stars,
   then health over readiness, then the three equipment slots. */
.bl-plate { position: absolute; inset: 0; pointer-events: none; transform-origin: 50% 78%; transform: rotateX(calc(var(--tilt) * -1)); transition: opacity .45s; }
.bl-board .bl-u.air .bl-plate { transform: translateZ(calc(var(--cell) * .78)) rotateX(calc(var(--tilt) * -1)); }
.bl-pl { position: absolute; left: 7%; right: 7%; bottom: calc(100% + var(--cell) * .02); display: flex; flex-direction: column; gap: 2px; }
/* The plate sits just over the unit's head, and units are not all one height: a man stands tall, a tank and a gun are low. */
#lines.gl .bl-u.b-vehicle .bl-pl, #lines.gl .bl-u.b-gun .bl-pl { bottom: calc(100% - var(--cell) * .3); }
#lines.gl .bl-u.b-air .bl-pl { bottom: calc(100% - var(--cell) * .36); }
/* A man on the drawn field stands taller than his square: his bars go over his head, not across his face. */
#lines.gl .bl-u.b-foot .bl-pl { bottom: calc(100% + var(--cell) * .24); }
.bl-plhead { display: flex; align-items: center; justify-content: center; gap: 4px; height: calc(var(--cell) * .19); }
.bl-board .bl-pl .bl-uflag { position: static; line-height: 0; }
.bl-board .bl-pl .bl-stars { position: static; font-size: calc(var(--cell) * .2); letter-spacing: 0; -webkit-text-stroke: .6px rgba(0, 0, 0, .8); }
.bl-board .bl-pl .bl-bars { position: static; gap: 1px; padding: 1px; background: #000; border-radius: 3px; box-shadow: 0 2px 4px rgba(0, 0, 0, .6); }
.bl-pl .bl-bars i { height: max(5px, calc(var(--cell) * .075)); border-radius: 1px; box-shadow: none; background: #1d1e1b; }
.bl-pl .bl-bars .mp { height: max(3px, calc(var(--cell) * .04)); }
.bl-board .bl-pl .bl-uits { position: static; flex-direction: row; justify-content: center; gap: 2px; }
.bl-board .bl-pl .bl-uits:empty { display: none; }
.bl-board .bl-pl .bl-uits i { width: calc(var(--cell) * .215); height: calc(var(--cell) * .215); min-width: 12px; min-height: 12px; border-radius: 3px; }
.bl-board .bl-pl .bl-uits i.e { background: rgba(0, 0, 0, .62) !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5) !important; }
/* In the fight the plate is cut down to what is read at a glance: the bars, the stars, and the kit carried (no empty slots). */
.bl-layer .bl-pl { left: 13%; right: 13%; gap: 1px; }
.bl-layer .bl-pl .bl-uits i.e { display: none; }
.bl-layer .bl-pl .bl-uits i { width: calc(var(--cell) * .17); height: calc(var(--cell) * .17); min-width: 10px; min-height: 10px; }
.bl-layer .bl-pl .bl-stars { font-size: calc(var(--cell) * .17); }
.bl-u.preview .bl-plate { opacity: .75; }
.bl-u.lifted .bl-plate { opacity: .25; }
.bl-u.dead .bl-plate { opacity: 0; }
.bl-u.shielded .bl-pl .bl-bars { box-shadow: 0 0 0 1px #e8e3c8, 0 2px 4px rgba(0, 0, 0, .6); }
.bl-bars .hp::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(var(--seg, 100%) - 1px), rgba(0, 0, 0, .75) calc(var(--seg, 100%) - 1px) var(--seg, 100%)); }
.bl-bars .hp em { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #ffb040; }
.bl-bars .hp b { position: relative; }
.bl-u.side1 .hp em { background: #ffe9c8; }
.bl-bars .hp.mend em { background: #d9ffc8; }
.bl-bars .hp.mend b::after { content: ''; position: absolute; right: -1px; top: -1px; bottom: -1px; width: 3px; background: #fff; box-shadow: 0 0 5px 2px #cfffb0; }
.bl-u.mine .hp b { background: linear-gradient(#8fe067, #4fa02f); }
.bl-u.foe .hp b { background: linear-gradient(#f07a62, #c23c26); }
.bl-u.side0 .hp b { background: linear-gradient(#8fe067, #4fa02f); }
.bl-u.side1 .hp b { background: linear-gradient(#f07a62, #c23c26); }
.bl-u.side0[data-hs="mid"] .hp b { background: linear-gradient(#ffdc52, #c99a12); }
.bl-u.side0[data-hs="low"] .hp b { background: linear-gradient(#ff9440, #d2521a); }
.bl-bars .mp b { background: #6fb7ff; width: 0; }
.bl-u.shielded .hp { box-shadow: 0 0 0 1px #000, 0 0 0 2px #e8e3c8; }
.bl-board .bl-u.hurt img { animation: bl-hurt .22s, bl-idle 2.4s ease-in-out infinite alternate; }
.bl-board .bl-u.walk img { animation: bl-walk .22s ease-in-out infinite alternate; }
.bl-board .bl-u.casting img { filter: brightness(1.45) drop-shadow(0 0 8px #8fd0ff); }
.bl-board .bl-u.casting .bl-base { animation: bl-castring .7s ease-out; }
.bl-board .bl-u.stunned img { filter: grayscale(1) brightness(.75); animation-play-state: paused; }
.bl-u.dead .bl-fig, .bl-u.dead .bl-base { opacity: 0; }
.bl-board .bl-u.dead img { rotate: 70deg; translate: 0 12%; animation: none; }
.bl-fig.lunge { animation: bl-lunge .2s; }
@keyframes bl-hurt { 0% { filter: brightness(2.2) saturate(.3); } 100% { filter: none; } }
@keyframes bl-lunge { 50% { translate: var(--lx, 0) var(--ly, 0); } }

.bl-ghost { position: fixed !important; z-index: 20; pointer-events: none; translate: -50% -50%; filter: drop-shadow(0 12px 10px rgba(0, 0, 0, .6)); scale: 1.12; }
.bl-ghost.bl-it { width: 34px !important; height: 34px !important; }

/* What a battle throws up. Words stand upright like the units; blasts lie on the ground. */
.bl-float {
  position: absolute; translate: -50% 0; transform-origin: 50% 100%; transform: rotateX(calc(var(--tilt) * -1));
  font: 700 calc(var(--cell) * .2) var(--f-head); font-style: normal; color: #fff; text-shadow: 0 1px 2px #000, 0 0 4px #000; animation: bl-float .8s ease-out forwards; white-space: nowrap;
}
.bl-float.abil { color: #8fd0ff; }
.bl-float.crit { color: #ffd257; font-style: italic; font-size: calc(var(--cell) * .27); text-shadow: 0 0 10px rgba(255, 170, 40, .9), 0 2px 0 #000; }
.bl-float.crit::after { content: '!'; }
.bl-float.heal { color: #8be06c; }
.bl-float.note { color: #f0ead0; font-size: calc(var(--cell) * .2); }
/* Every hit shows what it took: small and quick for an ordinary one, so the hard ones stand out. */
.bl-float.dmg { font-size: calc(var(--cell) * .17); color: #f4efe0; animation: bl-float-s .55s ease-out forwards; }
.bl-float.crit, .bl-float.abil { animation: bl-float-pop .9s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes bl-float { from { opacity: 1; translate: -50% 0; } to { opacity: 0; translate: -50% calc(var(--cell) * -.8); } }
@keyframes bl-float-s { from { opacity: .95; translate: -50% 0; } to { opacity: 0; translate: -50% calc(var(--cell) * -.5); } }
@keyframes bl-float-pop {
  0% { opacity: 1; translate: -50% 0; scale: .4; }
  18% { scale: 1.45; }
  34% { scale: 1; translate: -50% calc(var(--cell) * -.25); }
  70% { opacity: 1; }
  100% { opacity: 0; scale: 1; translate: -50% calc(var(--cell) * -.9); }
}
.bl-cast {
  position: absolute; left: 50%; top: -48%; translate: -50% 0; white-space: nowrap; padding: 1px 7px; border-radius: 2px;
  font: 600 10.5px var(--f-head); font-style: normal; letter-spacing: .06em; text-transform: uppercase; color: #241d0c;
  background: linear-gradient(#ecd47f, #c9a949); box-shadow: 0 0 0 1px #000, 0 2px 6px rgba(0, 0, 0, .6); animation: bl-cast 1.1s forwards; z-index: 3;
}
@keyframes bl-cast { 0% { opacity: 0; transform: translateY(6px); } 15%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.bl-ring { position: absolute; border-radius: 50%; animation: bl-ring .65s ease-out forwards; }
.bl-ring.blast, .bl-ring.bomb { background: radial-gradient(rgba(255, 240, 190, 1), rgba(255, 170, 60, .8) 30%, rgba(200, 70, 30, .45) 55%, transparent 72%); }
.bl-ring.smoke { background: radial-gradient(rgba(220, 220, 210, .75), rgba(150, 150, 140, .4) 55%, transparent 72%); }
.bl-ring.rally { border: 2px solid rgba(140, 224, 108, .9); background: radial-gradient(transparent 55%, rgba(140, 224, 108, .25)); }
@keyframes bl-ring { from { opacity: 1; transform: scale(.25); } to { opacity: 0; transform: scale(1.05); } }
/* Loot: what a fallen garrison unit leaves behind. It stands on the field until the battle ends, then is carried off. */
.bl-crate {
  --ih: #ffd35a;
  position: absolute; width: calc(var(--cell) * .5); height: calc(var(--cell) * .5); margin: calc(var(--cell) * -.5) 0 0 calc(var(--cell) * -.25);
  font-style: normal; transform-origin: 50% 100%; transform: rotateX(calc(var(--tilt) * -1));
  animation: bl-crate .65s cubic-bezier(.3, 1.35, .5, 1) backwards; transition: translate .6s ease-in, opacity .6s ease-in;
}
/* The light it lies in: a pool of its colour on the ground and a shaft of it standing over the drop, so it is found at a glance. */
.bl-crate::after { content: ''; position: absolute; z-index: -1; left: -55%; right: -55%; bottom: -20%; height: 46%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--ih) 80%, #fff) 0%, color-mix(in srgb, var(--ih) 45%, transparent) 45%, transparent 100%); animation: bl-crate-pool 1.5s ease-in-out .6s infinite alternate; }
.bl-crate::before { content: ''; position: absolute; z-index: -1; left: 22%; right: 22%; bottom: 40%; height: 230%; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(to top, color-mix(in srgb, var(--ih) 60%, transparent), transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 35% 65%, transparent); mask-image: linear-gradient(90deg, transparent, #000 35% 65%, transparent);
  animation: bl-crate-beam 1.5s ease-in-out .6s infinite alternate backwards; }
/* The thing itself: a round steel case with a brass rim, not a square of interface. */
.bl-cbody { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; font-style: normal; font-size: calc(var(--cell) * .27); color: #fff;
  background: radial-gradient(circle at 50% 30%, #4a4d55, #17181c 62%, #070708);
  box-shadow: inset 0 0 0 2px #d8b85a, inset 0 0 0 3.5px rgba(0, 0, 0, .6), inset 0 calc(var(--cell) * .05) calc(var(--cell) * .05) rgba(255, 255, 255, .22), 0 0 0 1.5px #0a0a0a, 0 0 calc(var(--cell) * .22) var(--ih), 0 3px 5px rgba(0, 0, 0, .6);
  animation: bl-crate-bob 1.2s ease-in-out .65s infinite alternate; }
/* Supplies come in an olive canister with the count stencilled on a tag. */
.bl-crate.gold .bl-cbody { color: #efe6bd; background: radial-gradient(circle at 50% 28%, #8d9560, #4a5230 58%, #262b16); }
.bl-crate.gold b { position: absolute; right: -24%; bottom: -10%; padding: 0 calc(var(--cell) * .05); font: 700 calc(var(--cell) * .2)/1.25 var(--f-head); color: #ffe88a; background: #14150f; border-radius: 99px; box-shadow: inset 0 0 0 1px #d8b85a, 0 1px 3px rgba(0, 0, 0, .6); }
/* A drop-zone marker turning round it. */
.bl-cring { position: absolute; inset: -16%; border-radius: 50%; pointer-events: none; border: 2px dashed color-mix(in srgb, var(--ih) 75%, #fff); opacity: .85; animation: bl-crate-ring 7s linear infinite; }
/* It comes down under a parachute, which folds once it has landed. */
.bl-cchute { position: absolute; left: -8%; right: -8%; bottom: 128%; height: 62%; border-radius: 50% 50% 0 0 / 100% 100% 0 0; pointer-events: none; transform-origin: 50% 100%;
  background: repeating-linear-gradient(90deg, #ece4c6 0 16.6%, #8c9360 16.6% 33.3%); box-shadow: inset 0 -3px 4px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .5); animation: bl-crate-chute .5s ease-in .6s forwards; }
.bl-cchute::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 52%;
  background: linear-gradient(to bottom right, transparent calc(50% - .7px), #ddd5b4 calc(50% - .7px) calc(50% + .7px), transparent calc(50% + .7px)) left / 50% 100% no-repeat, linear-gradient(to bottom left, transparent calc(50% - .7px), #ddd5b4 calc(50% - .7px) calc(50% + .7px), transparent calc(50% + .7px)) right / 50% 100% no-repeat; }
.bl-crate.got .bl-cchute, .bl-crate.taken .bl-cchute, .bl-crate.got .bl-cring, .bl-crate.got::before { display: none; }
@keyframes bl-crate-pool { to { opacity: .55; scale: 1.15; } }
@keyframes bl-crate-beam { from { opacity: .45; } to { opacity: .95; } }
@keyframes bl-crate-ring { to { rotate: 360deg; } }
@keyframes bl-crate-chute { to { opacity: 0; scale: 1.15 .1; } }
@media (prefers-reduced-motion: reduce) { .bl-crate, .bl-crate *, .bl-crate::before, .bl-crate::after { animation: none !important; } .bl-cchute { display: none; } }
.bl-crate { pointer-events: auto; cursor: pointer; }
.bl-crate:hover { filter: brightness(1.25); }
.bl-crate.taken { translate: 0 calc(var(--cell) * 1.2); opacity: 0; animation: none; pointer-events: none; }
/* Picked up by the player: it jumps to the hand. */
.bl-crate.got { translate: 0 calc(var(--cell) * -1.1); scale: 1.5; opacity: 0; animation: none; pointer-events: none; transition: translate .4s ease-out, scale .4s ease-out, opacity .4s ease-in; }
@keyframes bl-crate { from { opacity: 0; translate: 0 calc(var(--cell) * -2.2); } 25% { opacity: 1; } }
@keyframes bl-crate-bob { to { translate: 0 calc(var(--cell) * -.08); } }
.bl-ring.shock { border: 3px solid rgba(255, 240, 200, .85); animation-duration: .45s; }
/* A round in flight: <u> is the flash at the muzzle, <b> the round itself. A shell climbs and falls. */
.bl-shot { position: absolute; width: 0; height: 0; transform-origin: 0 0; transform-style: preserve-3d; }
.bl-shot b { position: absolute; left: 0; top: -1.5px; width: calc(var(--cell) * .45); height: 3px; border-radius: 2px; background: linear-gradient(90deg, transparent, #ffd257 60%, #fff); box-shadow: 0 0 6px #ffb040; animation: bl-shot var(--ms) linear forwards; }
.bl-shot u { position: absolute; left: calc(var(--cell) * .12); top: calc(var(--cell) * -.15); width: calc(var(--cell) * .3); height: calc(var(--cell) * .3); border-radius: 50%; background: radial-gradient(#fff, #ffd257 40%, transparent 70%); animation: bl-fade .12s forwards; }
.bl-shot.shell b { top: -4px; width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(#fff, #ff9a3c); box-shadow: 0 0 10px 2px #ff7a20; animation-name: bl-shell; animation-timing-function: linear; }
.bl-shot.shell u { width: calc(var(--cell) * .5); height: calc(var(--cell) * .5); top: calc(var(--cell) * -.25); }
@keyframes bl-shot { to { transform: translateX(calc(var(--d) - var(--cell) * .45)); } }
@keyframes bl-shell { 50% { transform: translateX(calc(var(--d) * .5)) translateZ(calc(var(--cell) * 1.1)); } to { transform: translateX(var(--d)); } }
.bl-spark {
  position: absolute; border-radius: 50%; transform-origin: 50% 100%; transform: rotateX(calc(var(--tilt) * -1));
  background: radial-gradient(circle, #fff 0 12%, #ffd257 24%, rgba(255, 140, 40, .5) 42%, transparent 62%); animation: bl-spark .26s ease-out forwards;
}
.bl-spark.slash { background: linear-gradient(120deg, transparent 42%, rgba(255, 255, 255, .95) 49%, #ffe9a6 53%, transparent 60%); }
@keyframes bl-spark { from { scale: .3; opacity: 1; } to { scale: 1; opacity: 0; } }
@keyframes bl-fade { to { opacity: 0; } }
.bl-strafe { position: absolute; left: 0; right: 0; height: var(--cell); background: linear-gradient(90deg, transparent, rgba(255, 233, 166, .7), transparent); animation: bl-fade .5s forwards; }
.bl-carpet { position: absolute; left: 0; right: 0; height: 50%; background: radial-gradient(ellipse, rgba(255, 190, 90, .75), rgba(200, 80, 30, .3) 60%, transparent 80%); animation: bl-fade .7s forwards; }
.bl-carpet.side0 { top: 0; }
.bl-carpet.side1 { bottom: 0; }

.bl-banner {
  position: absolute; left: 50%; top: 46%; translate: -50% -50%; display: none; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 56px; white-space: nowrap; z-index: 5;
  background: linear-gradient(90deg, transparent, rgba(10, 11, 8, .94) 18%, rgba(10, 11, 8, .94) 82%, transparent);
  border-top: 2px solid var(--brass); border-bottom: 2px solid var(--brass);
}
.bl-banner { pointer-events: none; }
.bl-banner.on { display: flex; animation: bl-pop .25s ease-out; }
.bl-banner.note { top: 34%; padding: 10px 44px; border-color: var(--brass-dim); animation: bl-note 1.5s ease-out forwards; }
.bl-banner.note b { font-size: calc(var(--cell) * .42); }
.bl-banner.note span { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; }
@keyframes bl-note { 0% { opacity: 0; transform: scale(.9); } 12%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; } }
/* Scouting another commander: a tab over the field that says whose army this is, and takes the player home. */
.bl-scout { position: absolute; left: 50%; bottom: calc(var(--cell) * -.05); translate: -50% 0; z-index: 4; zoom: var(--ui); }
.bl-scout button {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; cursor: pointer; color: #fff; white-space: nowrap;
  background: rgba(60, 18, 12, .92); border: 1px solid var(--foe); border-radius: 15px; box-shadow: 0 4px 14px rgba(0, 0, 0, .6);
}
.bl-scout b { font: 600 12px var(--f-head); letter-spacing: .12em; text-transform: uppercase; }
.bl-scout i { font-style: normal; opacity: .7; }
.bl-u.scouted { cursor: default; }
.bl-banner b { font: 700 calc(var(--cell) * .62) var(--f-head); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); text-shadow: 0 0 18px rgba(255, 226, 122, .5); }
.bl-banner.lost { border-color: #c96a4a; }
.bl-banner.lost b { color: #f09a86; text-shadow: 0 0 18px rgba(226, 81, 58, .5); }
.bl-banner span { color: var(--text); font-weight: 600; }
@keyframes bl-pop { from { opacity: 0; transform: scale(.85); } }
/* The verdict of a battle: struck gold on a dark band between brass rules, stars over it, the light
   going round behind and once across the word, and what was won or lost in plates under it. */
.bl-banner.won, .bl-banner.lost {
  padding: calc(var(--cell) * .2) calc(var(--cell) * 1.5) calc(var(--cell) * .2); gap: calc(var(--cell) * .05); min-width: calc(var(--cell) * 6); border: 0; isolation: isolate;
  background:
    linear-gradient(90deg, transparent, #f2c84a 22%, #fff6c8 50%, #f2c84a 78%, transparent) top / 100% 2px no-repeat,
    linear-gradient(90deg, transparent, #f2c84a 22%, #fff6c8 50%, #f2c84a 78%, transparent) bottom / 100% 2px no-repeat,
    linear-gradient(90deg, transparent, rgba(242, 200, 74, .4) 28%, rgba(242, 200, 74, .4) 72%, transparent) 0 6px / 100% 1px no-repeat,
    linear-gradient(90deg, transparent, rgba(242, 200, 74, .4) 28%, rgba(242, 200, 74, .4) 72%, transparent) 0 calc(100% - 6px) / 100% 1px no-repeat,
    linear-gradient(90deg, transparent, rgba(8, 8, 5, .9) 15%, rgba(30, 22, 8, .96) 50%, rgba(8, 8, 5, .9) 85%, transparent);
}
.bl-banner.on.won, .bl-banner.on.lost { animation: bl-win .55s cubic-bezier(.2, 1.3, .3, 1); }
@keyframes bl-win { 0% { opacity: 0; transform: scale(1.5); filter: brightness(3); } 55% { opacity: 1; transform: scale(.97); filter: none; } 100% { transform: none; } }
.bl-banner .rays { display: none; }
.bl-banner.won .rays {
  display: block; position: absolute; left: 50%; top: 50%; width: calc(var(--cell) * 8); height: calc(var(--cell) * 8); margin: calc(var(--cell) * -4) 0 0 calc(var(--cell) * -4); z-index: -1;
  background: repeating-conic-gradient(from 0deg, rgba(255, 210, 100, .2) 0 5deg, transparent 5deg 15deg);
  -webkit-mask: radial-gradient(closest-side, #000 6%, transparent 70%); mask: radial-gradient(closest-side, #000 6%, transparent 70%);
  rotate: var(--rot, 0deg); animation: bl-rays 16s linear infinite;
}
@keyframes bl-rays { to { rotate: 360deg; } }
.bl-banner em { display: none; }
.bl-banner.won em, .bl-banner.lost em { display: flex; align-items: center; gap: calc(var(--cell) * .14); font: 700 calc(var(--cell) * .2) var(--f-head); letter-spacing: .35em; color: #f2c84a; text-shadow: 0 0 10px rgba(255, 200, 80, .7); font-style: normal; }
.bl-banner em i { width: calc(var(--cell) * 1.1); height: 1px; background: linear-gradient(90deg, transparent, #f2c84a); }
.bl-banner em i:last-child { background: linear-gradient(270deg, transparent, #f2c84a); }
.bl-banner.won b, .bl-banner.lost b {
  position: relative; overflow: hidden; padding: 0 .1em 0 .36em; font-size: calc(var(--cell) * .9); letter-spacing: .26em; line-height: 1.1; color: transparent; text-shadow: none;
  background: linear-gradient(100deg, transparent 42%, rgba(255, 255, 255, .95) 50%, transparent 58%) var(--sw, -40%) 0 / 300% 100% no-repeat, linear-gradient(180deg, #fffbe0 0%, #ffe58a 30%, #f0b93a 54%, #a06c14 78%, #f6d67a 100%); -webkit-background-clip: text; background-clip: text;
  animation: bl-sweep 1.1s .35s ease-out both;
  filter: drop-shadow(0 2px 0 #3a2504) drop-shadow(0 4px 0 rgba(0, 0, 0, .7)) drop-shadow(0 0 18px rgba(255, 190, 60, .55));
}
@keyframes bl-sweep { from { background-position: 140% 0, 0 0; } to { background-position: -40% 0, 0 0; } }
.bl-banner.lost { background:
    linear-gradient(90deg, transparent, #c96a4a 22%, #ffc2b0 50%, #c96a4a 78%, transparent) top / 100% 2px no-repeat,
    linear-gradient(90deg, transparent, #c96a4a 22%, #ffc2b0 50%, #c96a4a 78%, transparent) bottom / 100% 2px no-repeat,
    linear-gradient(90deg, transparent, rgba(8, 6, 5, .9) 15%, rgba(34, 12, 8, .96) 50%, rgba(8, 6, 5, .9) 85%, transparent); }
.bl-banner.lost b { animation: none; background: linear-gradient(180deg, #ffe6de 0%, #f6a08c 34%, #e2513a 58%, #7a1f12 82%, #e98a74 100%); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 2px 0 #2a0a05) drop-shadow(0 4px 0 rgba(0, 0, 0, .7)) drop-shadow(0 0 16px rgba(226, 81, 58, .5)); }
.bl-banner.lost em { color: #e98a74; text-shadow: none; }
.bl-banner.lost em i { background: linear-gradient(90deg, transparent, #c96a4a); }
.bl-banner.lost em i:last-child { background: linear-gradient(270deg, transparent, #c96a4a); }
.bl-banner p { display: flex; gap: calc(var(--cell) * .1); margin: 0; }
.bl-banner p:empty { display: none; }
.bl-banner p span { padding: calc(var(--cell) * .035) calc(var(--cell) * .16); font: 700 calc(var(--cell) * .2) var(--f-head); letter-spacing: .12em; text-transform: uppercase; color: #ffe9a8; background: rgba(242, 200, 74, .12); border: 1px solid rgba(242, 200, 74, .55); border-radius: 999px; }
.bl-banner p span.bad { color: #ffc2b0; background: rgba(226, 81, 58, .14); border-color: rgba(226, 81, 58, .6); }

.bl-toasts { position: absolute; left: 50%; top: 8px; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; z-index: 6; }
.bl-toast { padding: 6px 14px; border-radius: 3px; background: rgba(14, 15, 12, .94); border: 1px solid rgba(255, 255, 255, .18); border-left: 3px solid #8a8b84; color: var(--text); font-weight: 600; white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, .6); animation: bl-toast 2.6s forwards; }
.bl-toast.warn { border-color: #c96a4a; color: #ffc7b8; }
.bl-toast.good { border-color: var(--brass); color: var(--gold); }
@keyframes bl-toast { 0% { opacity: 0; transform: translateY(-6px); } 8%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ----------------------------------------------------------------- bench */
.bl-bench { width: calc(var(--bcell, var(--cell)) * 7.4); max-width: 100%; }
.bl-benchhead { display: flex; justify-content: flex-start; gap: 8px; align-items: center; margin-bottom: 4px; font: 600 10.5px var(--f-head); letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.bl-cap { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; color: var(--text); background: rgba(0, 0, 0, .45); border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.bl-cap b { font-size: 13px; color: #fff; }
.bl-cap.short { color: #ffd257; box-shadow: inset 0 0 0 1px rgba(255, 210, 87, .6); }
.bl-cap.short b { color: #ffd257; }
.bl-slots { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; padding: 4px; background: linear-gradient(180deg, #121310, #23251f); border-radius: 5px; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 255, 255, .08); }
.bl-slot { position: relative; aspect-ratio: 1; background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .08)); border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), inset 0 6px 10px rgba(0, 0, 0, .45); }

/* ------------------------------------------------------------------ side */
.bl-side { grid-area: side; padding: 26px 14px 8px 8px; overflow-y: auto; }
.bl-side h4:not(:first-child) { margin-top: 16px; }
.bl-row {
  display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 7px 0 5px; margin-bottom: 4px;
  background: linear-gradient(270deg, rgba(20, 21, 23, .9), rgba(20, 21, 23, .45)); border-radius: 4px; border: 1px solid rgba(255, 255, 255, .06);
}
.bl-row[data-act] { cursor: pointer; transition: transform .1s, border-color .1s; }
.bl-row[data-act]:hover { transform: translateX(-3px); border-color: rgba(255, 255, 255, .3); }
.bl-row.scouting { border-color: var(--gold); box-shadow: 0 0 10px rgba(255, 226, 122, .4); }
.bl-row.me { background: linear-gradient(270deg, rgba(40, 74, 108, .9), rgba(40, 74, 108, .4)); border-color: rgba(111, 183, 255, .55); }
.bl-row.next { border-color: var(--foe); box-shadow: 0 0 10px rgba(226, 81, 58, .35); }
.bl-row.out { opacity: .38; }
.bl-rank { flex: none; width: 14px; font: 600 12px var(--f-head); font-style: normal; text-align: center; color: var(--text-dim); }
.bl-rflag { flex: none; line-height: 0; padding: 2px; background: #000; border-radius: 3px; }
.bl-rname { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-streak { font: 600 11px var(--f-head); font-style: normal; color: #ffd257; }
.bl-streak.down { color: #8fb7d8; }
.bl-rhp { position: relative; width: 62px; height: 18px; background: #000; border-radius: 2px; overflow: hidden; flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.bl-rhp i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#d2553c, #8a2418); }
.bl-row.me .bl-rhp i { background: linear-gradient(#5fa2d8, #2c5f8a); }
.bl-rhp b { position: absolute; inset: 0; text-align: center; font: 600 12px/18px var(--f-head); color: #fff; text-shadow: 0 1px 1px #000; }
.bl-stash, .bl-dirs { display: flex; flex-wrap: wrap; gap: 6px; }
/* Damage: the player's units by what they have done, longest bar first. */
.bl-dmgh.off { display: none; }
.bl-drow { display: flex; align-items: center; gap: 6px; height: 24px; margin-bottom: 3px; }
.bl-drow img { flex: none; width: 24px; height: 24px; object-fit: contain; transform: scaleX(-1); }
.bl-dbar { position: relative; flex: 1; height: 18px; min-width: 0; background: rgba(0, 0, 0, .5); border-radius: 2px; overflow: hidden; }
.bl-dbar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #8a2f1e, #e0703c); transition: width .3s; }
.bl-dbar b { position: relative; display: block; padding: 0 6px; font: 600 11px/18px var(--f-ui); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 1px #000; }
.bl-drow em { flex: none; width: 40px; font: 600 12px var(--f-head); font-style: normal; text-align: right; color: var(--gold); font-variant-numeric: tabular-nums; }
.bl-it, .bl-dir {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; font-size: 20px; border-radius: 4px;
  color: #241d0c; background: linear-gradient(160deg, #f6e08f, #b8922f); border: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 2px rgba(91, 74, 23, .6), 0 2px 5px rgba(0, 0, 0, .5);
}
.bl-itslot { width: 38px; height: 38px; border: 1px dashed rgba(255, 255, 255, .14); border-radius: 4px; background: rgba(0, 0, 0, .25); }
/* Equipment is a picture of the thing itself, on a dark plate with a brass edge. */
/* A near-black plate, so the piece itself stands out on it. */
.bl-it, .bl-uits i { color: #fff; background: radial-gradient(circle at 50% 38%, #34363c, #0b0c0e) !important; box-shadow: inset 0 0 0 2px #c9a949, inset 0 0 0 3px rgba(0, 0, 0, .5), 0 2px 5px rgba(0, 0, 0, .55) !important; }
/* Behind each piece, its own colour: a glow off the plate and a line of it along the bottom edge. */
.bl-it, .bl-uits i { position: relative; overflow: hidden; }
.bl-ihue { position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at 50% 56%, color-mix(in srgb, var(--ih) 58%, transparent) 0%, color-mix(in srgb, var(--ih) 18%, transparent) 46%, transparent 72%);
  box-shadow: inset 0 -3px 0 -1px var(--ih); }
.bl-ihue + .bl-ipic { position: relative; }
/* A finished piece catches the light now and then. */
.bl-it.full::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .5) 50%, transparent 62%); background-size: 300% 100%; background-position: 130% 0; animation: bl-ishine 4.5s ease-in-out infinite; }
@keyframes bl-ishine { 0%, 78% { background-position: 130% 0; } 100% { background-position: -40% 0; } }
@media (prefers-reduced-motion: reduce) { .bl-it.full::after { animation: none; } }
/* The pictures are painted in drab army colours: lifted and sharpened so they read at this size. */
.bl-ipic { display: block; width: 100%; height: 100%; padding: 3%; object-fit: contain; pointer-events: none; filter: brightness(1.06) drop-shadow(0 1px 1px #000); }
.bl-uits .bl-ipic { padding: 2%; }
/* A piece carried by a unit is a picture inside the unit, but none of the rules for the unit's own picture
   (its place, its sway, being put away when the field is drawn in three dimensions) are meant for it. */
#lines .bl-u .bl-ipic {
  position: static !important; inset: auto !important; width: 100% !important; height: 100% !important; visibility: visible !important;
  animation: none !important; transform: none !important; rotate: none !important; translate: none !important; scale: none !important;
  filter: brightness(1.06) drop-shadow(0 1px 1px #000) !important;
}
.bl-it { cursor: grab; touch-action: none; transition: transform .12s, filter .12s; }
.bl-it:hover { transform: translateY(-4px) scale(1.14); filter: brightness(1.15) drop-shadow(0 5px 4px rgba(0, 0, 0, .5)); }
#lines.dragging .bl-it:hover { transform: none; filter: none; }
.bl-slot .bl-u[data-drag] .bl-fig { transition: translate .12s, scale .12s; }
.bl-slot .bl-u[data-drag]:hover .bl-fig { translate: 0 -7%; scale: 1.1; }
#lines.dragging .bl-slot .bl-u[data-drag]:hover .bl-fig { translate: none; scale: none; }
@keyframes bl-snap { 0% { scale: 1.28; } 45% { scale: .92; } 75% { scale: 1.04; } 100% { scale: 1; } }
.bl-snap { animation: bl-snap .28s ease-out; }
.bl-it.sel { outline: 2px solid #fff; outline-offset: 1px; }
.bl-dir { color: var(--gold); background: linear-gradient(160deg, #474a50, #25272c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), inset 0 0 0 2px rgba(201, 169, 73, .35); border-radius: 50%; }
#lines.dragging.drag-item .bl-board .bl-u.mine .bl-base { box-shadow: inset 0 0 0 3px #fff9bf, 0 0 calc(var(--cell) * .25) rgba(255, 249, 191, .9); }
#lines.dragging.drag-item .bl-slot .bl-u { outline: 1px dashed rgba(255, 249, 191, .7); outline-offset: -3px; border-radius: 4px; }

/* ------------------------------------------------------------------ shop */
.bl-shop {
  grid-area: shop; position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; padding: 0 12px 12px;
  background: linear-gradient(180deg, var(--steel-1), var(--steel-2) 30%, var(--steel-3));
  border-top: 2px solid var(--brass-dim); box-shadow: 0 -8px 28px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.bl-strip { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; width: min(1200px, 100%); height: 34px; }
.bl-odds { display: inline-flex; gap: 4px; justify-self: start; }
.bl-odds i { min-width: 40px; padding: 2px 6px; font: 600 11.5px var(--f-head); font-style: normal; text-align: center; color: #fff; background: #17181b; border-radius: 2px; border-bottom: 2px solid var(--cc); font-variant-numeric: tabular-nums; }
.bl-odds i.nil { opacity: .35; }
:is(#lines, :is(#tooltip, #subtip).bl) .c1 { --cc: #8f949b; } :is(#lines, :is(#tooltip, #subtip).bl) .c2 { --cc: #54a85b; } :is(#lines, :is(#tooltip, #subtip).bl) .c3 { --cc: #4290dc; }
:is(#lines, :is(#tooltip, #subtip).bl) .c4 { --cc: #b458d6; } :is(#lines, :is(#tooltip, #subtip).bl) .c5 { --cc: #f0b23c; }
/* Supplies: a plate standing proud of the bar, where the eye lands first. */
.bl-gold {
  position: relative; top: -9px; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 26px; font-size: 20px; color: var(--brass);
  background: linear-gradient(180deg, #4a4638, #1c1b16); border: 1px solid #000; border-top: 2px solid var(--brass); border-radius: 6px 6px 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 -4px 14px rgba(0, 0, 0, .5);
}
.bl-gold b { font: 700 28px/1 var(--f-head); color: var(--gold); font-variant-numeric: tabular-nums; text-shadow: 0 0 12px rgba(255, 226, 122, .35); }
.bl-gold i { font: 600 13px var(--f-head); font-style: normal; color: #9be06c; }
.bl-gold b { display: inline-block; }
.bl-gold b.up { animation: bl-goldup .45s ease-out; }
.bl-gold b.down { animation: bl-golddown .35s ease-out; }
@keyframes bl-goldup { 0% { transform: scale(1.5); color: #b6ff8a; text-shadow: 0 0 18px #9be06c; } }
@keyframes bl-golddown { 0% { transform: translateY(4px) scale(.86); color: #ff9a8a; } }
/* A card that can be afforded answers the pointer and the press. */
.bl-card:not(.dear):hover { filter: brightness(1.14); box-shadow: 0 0 0 1px var(--cc), 0 6px 16px rgba(0, 0, 0, .5), 0 0 18px color-mix(in srgb, var(--cc) 55%, transparent); }
.bl-card:active { filter: brightness(1.35); transition-duration: .04s; }
.bl-ebtn:not(:disabled):hover, .bl-ready:not(:disabled):hover { filter: brightness(1.12); }
.bl-inc { display: inline-flex; align-items: center; gap: 12px; justify-self: end; }
.bl-int { display: inline-flex; gap: 3px; padding: 4px 6px; background: #17181b; border-radius: 2px; }
.bl-int i { width: 9px; height: 9px; rotate: 45deg; margin: 0 2px; background: #33363a; box-shadow: inset 0 0 0 1px #000; }
.bl-int i.on { background: linear-gradient(135deg, #fff3a8, #c9a949); box-shadow: 0 0 6px rgba(255, 226, 122, .7); }
.bl-lock { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 24px; cursor: pointer; font-size: 14px; color: var(--text-dim); background: #17181b; border: 1px solid rgba(255, 255, 255, .14); border-radius: 3px; }
.bl-lock:hover { color: #fff; }
.bl-lock.on { color: #241d0c; background: linear-gradient(#fff3a8, #c9a949); border-color: #000; }
.bl-cards.locked .bl-card:not(.empty) { box-shadow: 0 0 0 1px #000, 0 0 0 3px rgba(255, 226, 122, .55); }
.bl-ebtn.dear .bl-ecost { color: #f07a62; }
.bl-ebtn.dear .bl-eic { opacity: .5; }
.bl-run { font: 600 12px var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: #ffd257; white-space: nowrap; }
.bl-run.down { color: #8fb7d8; }

.bl-deck { display: flex; align-items: stretch; justify-content: center; gap: 12px; width: min(1200px, 100%); }
.bl-econ { display: flex; flex-direction: column; gap: 5px; width: 214px; flex: none; }
.bl-lvl { position: relative; display: flex; align-items: baseline; justify-content: space-between; height: 36px; padding: 4px 9px 0; background: #121316; border: 1px solid #000; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); overflow: hidden; }
.bl-lvl b { font: 700 15px var(--f-head); letter-spacing: .1em; text-transform: uppercase; color: #fff; }
.bl-lvl em { font: 600 12px var(--f-head); font-style: normal; color: #8fd0ff; font-variant-numeric: tabular-nums; }
.bl-xpbar { position: absolute; left: 6px; right: 6px; bottom: 5px; height: 5px; background: #000; border-radius: 2px; overflow: hidden; }
.bl-xpbar b { display: block; height: 100%; background: linear-gradient(#9fd6ff, #3f8fd6); transition: width .3s; }
.bl-ebtn {
  position: relative; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 8px; cursor: pointer; text-align: left;
  color: var(--text); border: 1px solid #000; border-radius: 4px; font-size: 12px;
  background: linear-gradient(180deg, #55606a, #2f363d); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -2px 0 rgba(0, 0, 0, .35), 0 2px 4px rgba(0, 0, 0, .5);
  transition: filter .1s, transform .06s;
}
.bl-ebtn.roll { background: linear-gradient(180deg, #6a6140, #3a3421); }
.bl-ebtn:hover:not(:disabled) { filter: brightness(1.22); }
.bl-ebtn:active:not(:disabled) { transform: translateY(1px); }
.bl-ebtn:disabled { opacity: .45; cursor: default; }
.bl-eic { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; font-size: 16px; color: #fff; background: rgba(0, 0, 0, .35); border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); }
.bl-elab { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.15; }
.bl-ebtn b { font: 600 15px var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.bl-ebtn small { font-size: 10.5px; color: rgba(255, 255, 255, .6); white-space: nowrap; }
.bl-ecost { display: inline-flex; align-items: center; gap: 4px; font: 700 15px var(--f-head); color: var(--gold); white-space: nowrap; }
.bl-ecost.free { color: #9be06c; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
.bl-ebtn kbd { flex: none; min-width: 18px; padding: 1px 4px; font: 600 10px var(--f-head); text-align: center; color: rgba(255, 255, 255, .7); background: rgba(0, 0, 0, .4); border: 1px solid rgba(255, 255, 255, .2); border-radius: 3px; }
.bl-sup { display: inline-flex; align-items: center; gap: 3px; }
.bl-sup b { font-weight: 700; }

.bl-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 158px)); gap: 8px; flex: 0 1 822px; min-width: 0; }
.bl-card {
  --cc: #8f949b;
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 118px; padding: 0; cursor: pointer; overflow: hidden; text-align: left;
  background: #121316; border: 2px solid var(--cc); border-radius: 6px; color: #fff;
  box-shadow: 0 0 0 1px #000, 0 4px 10px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(0, 0, 0, .6);
  transition: transform .12s, box-shadow .12s, filter .12s;
}
.bl-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .22) 50%, transparent 65%); translate: -120% 0; pointer-events: none; }
.bl-card:hover { transform: translateY(-6px); box-shadow: 0 0 0 1px #000, 0 10px 18px rgba(0, 0, 0, .6), 0 0 16px color-mix(in srgb, var(--cc) 70%, transparent); }
.bl-card:hover::after { translate: 120% 0; transition: translate .45s; }
.bl-card:active { transform: translateY(-2px); }
.bl-card.empty { border: 1px dashed rgba(255, 255, 255, .12); background: rgba(0, 0, 0, .25); box-shadow: inset 0 4px 12px rgba(0, 0, 0, .5); cursor: default; }
.bl-card.empty::after { display: none; }
.bl-card.empty:hover { transform: none; }
.bl-card.dear { filter: grayscale(.75) brightness(.62); }
.bl-card.have .bl-cfoot b { color: var(--gold); }
.bl-card.promote { animation: bl-glow 1.1s ease-in-out infinite alternate; }
@keyframes bl-glow { from { box-shadow: 0 0 0 1px #000, 0 0 10px 1px rgba(255, 226, 122, .7); } to { box-shadow: 0 0 0 1px #000, 0 0 20px 5px rgba(255, 226, 122, 1); } }
.bl-cart { position: absolute; inset: 0; background: center/cover no-repeat; }
.bl-cart::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .05) 25%, rgba(0, 0, 0, .88) 80%); }
.bl-cflag { position: absolute; right: 0; top: 0; padding: 2px 7px; font: 600 10px var(--f-head); font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: #241d0c; background: linear-gradient(#fff3a8, #e0b83a); border-bottom-left-radius: 5px; }
.bl-ctraits { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 0 7px 5px; font-size: 11px; }
.bl-ctraits i { display: flex; align-items: center; gap: 5px; font-style: normal; color: #d8d3bf; text-shadow: 0 1px 2px #000; }
.bl-ctraits i.hit { color: var(--gold); font-weight: 600; }
.bl-ctraits em { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-ctraits .flag { width: 16px !important; height: 11px !important; }
.bl-cfoot {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 5px 7px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--cc) 62%, #0d0e10), color-mix(in srgb, var(--cc) 18%, #0d0e10)); border-top: 1px solid var(--cc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.bl-cfoot b { font: 600 12.5px var(--f-head); letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 1px #000; }
.bl-cfoot .bl-sup { color: var(--gold); flex: none; font-size: 13px; text-shadow: 0 1px 1px #000; }

.bl-go { display: flex; flex-direction: column; justify-content: center; gap: 8px; width: 176px; flex: none; }
.bl-ready {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; height: 80px; cursor: pointer;
  color: #1f1905; border: 1px solid #000; border-radius: 6px;
  background: linear-gradient(180deg, #fff3a8, #d9b548 45%, #a8862a);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), inset 0 -4px 0 rgba(0, 0, 0, .28), 0 4px 12px rgba(0, 0, 0, .6), 0 0 18px rgba(255, 226, 122, .25);
  transition: filter .1s, transform .06s;
}
.bl-ready b { font: 700 23px/1 var(--f-head); letter-spacing: .14em; text-transform: uppercase; }
.bl-ready small { font: 600 10px var(--f-head); letter-spacing: .16em; text-transform: uppercase; opacity: .65; }
.bl-ready:hover:not(:disabled) { filter: brightness(1.1); }
.bl-ready:active:not(:disabled) { transform: translateY(2px); }
.bl-ready:disabled { cursor: default; color: #c8c4b2; background: linear-gradient(180deg, #55585c, #2c2e31); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15); }
.bl-ready:disabled small { letter-spacing: .04em; text-transform: none; }
.bl-auto { height: 30px; cursor: pointer; font: 600 11px var(--f-head); letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .16); border-radius: 4px; }
.bl-auto:hover:not(:disabled) { color: #fff; border-color: rgba(255, 255, 255, .4); }
.bl-auto:disabled { opacity: .4; }
.bl-sell {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center; gap: 10px; pointer-events: none;
  font: 700 22px var(--f-head); letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
  background: repeating-linear-gradient(135deg, rgba(86, 26, 16, .95) 0 26px, rgba(66, 20, 12, .95) 26px 52px); border-top: 2px solid #c96a4a;
}
#lines.dragging.drag-unit .bl-sell { display: flex; }

/* -------------------------------------------------------------- overlays */
.bl-over { position: absolute; inset: 0; z-index: 30; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(8, 9, 7, .78); }
.bl-over.on { display: flex; }
.bl-sheet {
  width: min(760px, 100%); max-height: 100%; overflow-y: auto; padding: 26px 28px 28px; text-align: center;
  background: linear-gradient(var(--bone-lit), var(--bone)); color: var(--ink-soft); border: 1px solid var(--edge); border-radius: 5px;
  box-shadow: 0 20px 70px #000, inset 0 0 0 1px rgba(255, 255, 255, .45); animation: bl-pop .25s ease-out;
}
.bl-sheet h2 { margin: 0 0 4px; font: 700 34px var(--f-head); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.bl-lede { margin: 0 0 18px; font-size: 14.5px; color: var(--ink-soft); }
.bl-howto { width: min(480px, 100%); }
.bl-howto ol { margin: 0 0 22px; padding-left: 22px; text-align: left; font-size: 14.5px; line-height: 1.75; }
.bl-howto b { color: var(--ink); }
/* The first screen: three steps, dark and gold like the war council. */
.bl-sheet.bl-howto { width: min(640px, 100%); color: #d8d2bc; background: radial-gradient(120% 80% at 50% 0%, #2f2a1c 0%, #17181b 55%, #101114 100%); border: 1px solid #6a5a2c; box-shadow: 0 20px 70px #000, inset 0 3px 0 rgba(201, 169, 73, .55); }
.bl-howto h2 { color: transparent; background: linear-gradient(180deg, #fff3b0, #e9bd45 60%, #b9831a); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 2px 0 #000); }
.bl-howto .bl-lede { color: #b9b29a; }
/* The eight who are in it, each standing over his flag: the player's own picked out in gold. */
.bl-eight { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin: 0 0 14px; }
.bl-eight > div { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 6px 2px 5px; border-radius: 5px; background: radial-gradient(90% 60% at 50% 78%, rgba(201, 169, 73, .2), transparent 70%), rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(201, 169, 73, .22); }
.bl-eight > div.me { background: radial-gradient(90% 60% at 50% 78%, rgba(255, 215, 106, .45), transparent 72%), rgba(255, 226, 122, .1); box-shadow: inset 0 0 0 2px #e9bd45, 0 0 14px rgba(255, 215, 106, .35); }
.bl-eight > div.out { opacity: .4; filter: grayscale(1); }
.bl-eight img { width: 100%; max-width: 76px; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .7)); }
.bl-eight span { display: flex; align-items: center; justify-content: center; gap: 4px; max-width: 100%; margin-top: 3px; }
.bl-eight b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 11px var(--f-head); letter-spacing: .06em; text-transform: uppercase; color: #f1ead2; }
.bl-eight .me b { color: #ffe58a; }
#lines.narrow .bl-eight { grid-template-columns: repeat(4, 1fr); gap: 5px; margin-bottom: 10px; }
#lines.narrow .bl-eight img { max-width: 64px; }
#lines.narrow.land .bl-eight { grid-template-columns: repeat(8, 1fr); }
#lines.narrow.land .bl-eight img { max-width: 40px; }
@media (max-height: 700px) { #lines.narrow:not(.land) .bl-eight img { max-width: 44px; } }
.bl-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 16px; }
.bl-steps > div { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px 14px; border-radius: 5px; background: rgba(255, 255, 255, .045); box-shadow: inset 0 0 0 1px rgba(201, 169, 73, .3); font-size: 30px; color: var(--gold); }
.bl-steps i { position: absolute; left: 8px; top: 6px; font: 700 13px var(--f-head); font-style: normal; color: #8f8769; }
.bl-steps b { font: 700 18px var(--f-head); letter-spacing: .12em; text-transform: uppercase; color: #f1ead2; }
.bl-steps span:not(.ic) { font-size: 13px; line-height: 1.45; color: #b9b29a; }
.bl-tips { margin: 0 0 20px; font-size: 13px; line-height: 1.6; color: #9a947f; }
.bl-howto .bl-tips b { color: #e2c773; font-weight: 600; }
#lines.narrow .bl-steps { grid-template-columns: 1fr; gap: 6px; }
#lines.narrow .bl-steps > div { flex-direction: row; text-align: left; padding: 9px 10px 9px 30px; font-size: 22px; gap: 10px; }
#lines.narrow .bl-steps span:not(.ic) { flex: 1; }
#lines.narrow.land .bl-steps { grid-template-columns: repeat(3, 1fr); }
#lines.narrow.land .bl-steps > div { flex-direction: column; text-align: center; padding: 10px 6px 8px; }
#lines.narrow.land .bl-tips { display: none; }
.bl-offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bl-offer {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 14px 16px; cursor: pointer; text-align: center;
  color: var(--text); background: linear-gradient(180deg, #3a3c41, #1f2024); border: 2px solid #000; border-radius: 5px; transition: transform .12s, border-color .12s, box-shadow .12s;
}
.bl-offer:hover { transform: translateY(-5px); border-color: var(--brass); box-shadow: 0 10px 22px rgba(0, 0, 0, .5), 0 0 16px rgba(255, 226, 122, .35); }
/* A directive's tier: steel for a Field order, gold for a Staff order, flame for a Supreme one. */
:is(.bl-offer, .bl-dir, .bl-tiers span).t1 { --tc: #a9b2ba; } :is(.bl-offer, .bl-dir, .bl-tiers span).t2 { --tc: #e2bf5a; } :is(.bl-offer, .bl-dir, .bl-tiers span).t3 { --tc: #f0703f; }
.bl-offer { position: relative; padding-top: 40px; border-color: var(--tc); box-shadow: inset 0 0 0 1px #000, 0 0 18px color-mix(in srgb, var(--tc) 30%, transparent); background: radial-gradient(ellipse at 50% 0, color-mix(in srgb, var(--tc) 28%, transparent), transparent 60%), linear-gradient(180deg, #3a3c41, #1f2024); }
.bl-offer:hover { border-color: var(--tc); box-shadow: 0 10px 22px rgba(0, 0, 0, .5), 0 0 22px color-mix(in srgb, var(--tc) 60%, transparent); }
.bl-otier { position: absolute; left: 0; right: 0; top: 0; padding: 5px 0 4px; font: 700 11px var(--f-head); font-style: normal; letter-spacing: .2em; text-transform: uppercase; color: #17140d; background: linear-gradient(180deg, var(--tc), color-mix(in srgb, var(--tc) 70%, #000)); border-radius: 3px 3px 0 0; }
.bl-otier u, .bl-tiers u { text-decoration: none; margin-right: 6px; letter-spacing: .1em; }
.bl-offer.t3 .bl-otier { animation: bl-glow 1.2s ease-in-out infinite alternate; }
.bl-offer .bl-oic { background: linear-gradient(color-mix(in srgb, var(--tc) 85%, #fff), var(--tc)); }
.bl-offer b { color: var(--tc) !important; }
.bl-tiers { display: flex; justify-content: center; gap: 8px; margin: -6px 0 16px; }
.bl-tiers span { padding: 3px 10px; border-radius: 3px; font: 700 10.5px var(--f-head); letter-spacing: .14em; text-transform: uppercase; color: var(--tc); border: 1px solid color-mix(in srgb, var(--tc) 45%, transparent); opacity: .4; }
.bl-tiers span.on { opacity: 1; color: #17140d; background: var(--tc); }
.bl-dir { box-shadow: inset 0 0 0 2px var(--tc, transparent); color: var(--tc, inherit); }
.bl-oic { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; font-size: 28px; border-radius: 50%; color: #241d0c; background: linear-gradient(#ecd47f, #c9a949); }
.bl-offer b { font: 700 17px var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.bl-otext { font-size: 13.5px; line-height: 1.4; min-height: 56px; }
.bl-offer i { font-size: 11.5px; line-height: 1.4; color: var(--text-dim); }
/* The War Council: three sealed orders dealt upright over the darkened field. Each card is read
   top to bottom: the emblem on its tier's colour, the ribbon naming the tier, the order, what it
   does with the figures picked out, a line of history, and the word that takes it. */
.bl-over:has(.bl-council) { background: radial-gradient(ellipse 80% 70% at 50% 45%, rgba(8, 9, 7, .72), rgba(4, 5, 4, .93)); }
.bl-sheet.bl-council {
  width: min(1040px, 100%); padding: 6px 8px 10px; color: #ece8da; background: none; border: 0; box-shadow: none; animation: none; overflow: visible;
}
.bl-council h2 { font-size: 44px; letter-spacing: .2em; color: transparent; background: linear-gradient(180deg, #fff6cf, #f2d98b 45%, #b98a26); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 3px 0 #000) drop-shadow(0 0 22px rgba(255, 190, 70, .35)); }
.bl-council .bl-lede { margin-bottom: 10px; font-size: 16.5px; color: #d9d4c2; text-shadow: 0 1px 2px #000; }
.bl-council .bl-tiers { margin: 0 0 22px; gap: 10px; }
.bl-council .bl-tiers span { padding: 5px 14px; font-size: 12px; opacity: .45; background: rgba(0, 0, 0, .5); }
.bl-council .bl-tiers span.on { background: var(--tc); }
.bl-council .bl-offers { gap: 22px; align-items: stretch; perspective: 1400px; }
.bl-council .bl-offer {
  --d: 0s; overflow: hidden; min-height: 430px; padding: 0 0 16px; gap: 0; border: 2px solid var(--tc); border-radius: 12px;
  background: linear-gradient(180deg, #2b2e34 0%, #191b1f 46%, #101114 100%);
  box-shadow: inset 0 0 0 1px #000, inset 0 0 0 3px color-mix(in srgb, var(--tc) 22%, transparent), 0 14px 34px rgba(0, 0, 0, .7), 0 0 26px color-mix(in srgb, var(--tc) 28%, transparent);
  animation: bl-deal .5s cubic-bezier(.2, .9, .25, 1.15) var(--d) both; transition: transform .16s ease-out, box-shadow .16s, filter .16s;
}
.bl-council .bl-offer:nth-child(2) { --d: .09s; } .bl-council .bl-offer:nth-child(3) { --d: .18s; }
@keyframes bl-deal { from { opacity: 0; transform: translateY(70px) rotateX(-28deg) scale(.86); } }
.bl-council .bl-offer:hover, .bl-council .bl-offer:focus-visible {
  transform: translateY(-12px) scale(1.035); outline: 0; filter: brightness(1.08);
  box-shadow: inset 0 0 0 1px #000, inset 0 0 0 3px color-mix(in srgb, var(--tc) 40%, transparent), 0 24px 44px rgba(0, 0, 0, .8), 0 0 44px color-mix(in srgb, var(--tc) 70%, transparent);
}
.bl-council .bl-offer:active { transform: translateY(-4px) scale(.99); }
/* The head of the card: the tier's colour coming down from the top, rays turning slowly behind the emblem. */
.bl-ohead { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 168px; flex: none; overflow: hidden;
  background: radial-gradient(ellipse 90% 100% at 50% 0, color-mix(in srgb, var(--tc) 62%, #000), color-mix(in srgb, var(--tc) 14%, #14151a) 78%); }
.bl-ohead::before { content: ''; position: absolute; left: 50%; top: 50%; width: 520px; height: 520px; margin: -260px 0 0 -260px;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--tc) 60%, #fff) 0 6deg, transparent 6deg 18deg); opacity: .16;
  -webkit-mask: radial-gradient(closest-side, #000 20%, transparent 72%); mask: radial-gradient(closest-side, #000 20%, transparent 72%); animation: bl-turn 26s linear infinite; }
.bl-ohead::after { content: ''; position: absolute; inset: auto 0 0; height: 46px; background: linear-gradient(180deg, transparent, #1d1f24); }
@keyframes bl-turn { to { transform: rotate(360deg); } }
.bl-council .bl-oic {
  position: relative; z-index: 1; width: 104px; height: 104px; font-size: 52px; color: #1a1408;
  background: radial-gradient(circle at 34% 28%, #fff, color-mix(in srgb, var(--tc) 88%, #fff) 38%, var(--tc) 66%, color-mix(in srgb, var(--tc) 55%, #000));
  box-shadow: 0 0 0 3px #111, 0 0 0 6px color-mix(in srgb, var(--tc) 70%, #000), 0 0 0 7px #000, 0 10px 22px rgba(0, 0, 0, .7), 0 0 34px color-mix(in srgb, var(--tc) 60%, transparent);
}
.bl-council .bl-otier {
  position: relative; z-index: 2; left: auto; right: auto; top: auto; align-self: stretch; margin: -14px 14px 0; padding: 7px 0 6px; font-size: 12.5px; letter-spacing: .2em;
  border-radius: 3px; box-shadow: 0 3px 8px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .45);
  clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 50%, 100% 100%, 0 100%, 9px 50%);
}
.bl-council .bl-offer.t3 .bl-otier { animation: none; }
.bl-council .bl-offer b { margin: 16px 16px 0; font-size: 25px; line-height: 1.1; letter-spacing: .07em; text-shadow: 0 2px 0 #000; }
.bl-council .bl-otext { margin: 10px 18px 0; min-height: 0; font-size: 17px; line-height: 1.42; font-weight: 500; color: #fff; }
.bl-council .bl-otext strong { font-weight: 700; color: #ffe27a; white-space: nowrap; }
.bl-council .bl-offer i { width: auto; margin: 14px 18px 0; padding-top: 11px; font-size: 13px; line-height: 1.5; color: #a9a493; border-top: 1px solid rgba(255, 255, 255, .12); }
.bl-opick {
  margin-top: auto; align-self: stretch; padding: 9px 0 8px; border-radius: 4px; font: 700 14px var(--f-head); letter-spacing: .16em; text-transform: uppercase;
  color: #17140d; background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 80%, #fff), var(--tc)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 2px 5px rgba(0, 0, 0, .5);
}
.bl-council .bl-opick { margin: auto 16px 0; padding: 12px 0 10px; font-size: 16px; letter-spacing: .2em; border-radius: 6px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 0 color-mix(in srgb, var(--tc) 45%, #000), 0 8px 14px rgba(0, 0, 0, .5); }
.bl-council .bl-offer i { margin-bottom: 16px; }
.bl-offer:hover .bl-opick { filter: brightness(1.12); }
/* A Supreme order catches the light: a band of it crosses the card every few seconds. */
.bl-council .bl-offer.t3::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: 10px;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .22) 50%, transparent 58%) 0 0 / 300% 100% no-repeat; animation: bl-sheen 3.6s ease-in-out infinite; }
@keyframes bl-sheen { 0%, 55% { background-position: 150% 0; } 100% { background-position: -60% 0; } }
/* On a phone the three stand side by side still, narrower and without the line of history. */
#lines.narrow .bl-over:has(.bl-council) { padding: 8px 6px; }
#lines.narrow .bl-sheet.bl-council { padding: 0; max-height: 100%; overflow-y: auto; overflow-x: hidden; }
#lines.narrow .bl-council h2 { font-size: 30px; letter-spacing: .14em; }
#lines.narrow .bl-council .bl-lede { font-size: 14px; margin-bottom: 8px; }
#lines.narrow .bl-council .bl-tiers { gap: 5px; margin-bottom: 14px; }
#lines.narrow .bl-council .bl-tiers span { padding: 3px 7px; font-size: 9.5px; letter-spacing: .06em; }
#lines.narrow .bl-council .bl-offers { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 6px 0 10px; }
#lines.narrow .bl-council .bl-offer { display: flex; min-height: 318px; padding: 0 0 8px; border-radius: 9px; text-align: center; }
#lines.narrow .bl-ohead { height: 104px; }
#lines.narrow .bl-council .bl-oic { width: 62px; height: 62px; font-size: 31px; }
#lines.narrow .bl-council .bl-otier { margin: -10px 4px 0; padding: 5px 0 4px; font-size: 8.5px; letter-spacing: .08em; clip-path: none; }
#lines.narrow .bl-council .bl-otier u { margin-right: 3px; }
#lines.narrow .bl-council .bl-offer b { margin: 10px 5px 0; font-size: 15px; letter-spacing: .03em; overflow-wrap: anywhere; }
#lines.narrow .bl-council .bl-otext { margin: 7px 7px 10px; font-size: 12.5px; line-height: 1.34; }
#lines.narrow .bl-council .bl-offer i { display: none; }
#lines.narrow .bl-council .bl-opick { margin: auto 6px 0; padding: 9px 0 7px; font-size: 12.5px; letter-spacing: .12em; text-align: center; }
/* A phone on its side has the width and not the height: shorter heads, the same three. */
#lines.narrow.land .bl-sheet.bl-council { max-height: calc(100vh - 12px); padding: 0; }
#lines.narrow.land .bl-council h2 { font-size: 22px; display: inline-block; margin-right: 12px; }
#lines.narrow.land .bl-council .bl-lede { display: inline-block; margin: 0 0 4px; }
#lines.narrow.land .bl-council .bl-tiers { display: none; }
#lines.narrow.land .bl-council .bl-offers { gap: 10px; padding-top: 2px; }
#lines.narrow.land .bl-council .bl-offer { min-height: 0; }
#lines.narrow.land .bl-ohead { height: 66px; }
#lines.narrow.land .bl-council .bl-oic { width: 46px; height: 46px; font-size: 24px; }
#lines.narrow.land .bl-council .bl-offer b { margin-top: 8px; font-size: 16px; }
#lines.narrow.land .bl-council .bl-otext { font-size: 13px; }
/* A low window (a small laptop): shorter heads and no line of history, so nothing has to scroll. */
@media (max-height: 760px) {
  #lines:not(.narrow) .bl-council h2 { font-size: 32px; }
  #lines:not(.narrow) .bl-council .bl-tiers { margin-bottom: 12px; }
  #lines:not(.narrow) .bl-council .bl-offer { min-height: 0; }
  #lines:not(.narrow) .bl-ohead { height: 116px; }
  #lines:not(.narrow) .bl-council .bl-oic { width: 78px; height: 78px; font-size: 39px; }
  #lines:not(.narrow) .bl-council .bl-offer i { display: none; }
  #lines:not(.narrow) .bl-council .bl-otext { margin-bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) { .bl-council .bl-offer, .bl-ohead::before, .bl-council .bl-offer.t3::after { animation: none; } }

/* Settings: sound first. */
.bl-sheet.bl-settings {
  width: min(500px, 100%); padding: 24px 26px; text-align: left; color: #ece8da;
  background: linear-gradient(180deg, #2c2f35, #14151a); border: 1px solid #000; box-shadow: 0 0 0 1px rgba(201, 169, 73, .6), 0 24px 70px #000;
}
.bl-settings h2 { font-size: 30px; color: #f2d98b; text-align: center; margin-bottom: 10px; }
.bl-settings h3 { margin: 14px 0 6px; padding-bottom: 5px; font: 700 11.5px var(--f-head); letter-spacing: .2em; text-transform: uppercase; color: var(--brass); border-bottom: 1px solid rgba(201, 169, 73, .35); }
.bl-vol, .bl-setrow { display: grid; grid-template-columns: 132px 1fr 46px 76px; align-items: center; gap: 10px; padding: 8px 0; }
.bl-setrow { grid-template-columns: 1fr auto; }
.bl-vol span b, .bl-setrow span b { display: block; font: 600 15px var(--f-head); letter-spacing: .06em; color: #fff; }
.bl-vol span em, .bl-setrow span em { display: block; font-size: 11.5px; font-style: normal; line-height: 1.3; color: #a9a593; }
.bl-vol input[type="range"] { width: 100%; height: 26px; accent-color: #e2bf5a; cursor: pointer; }
.bl-vol output { font: 600 14px var(--f-head); text-align: right; color: #ffe27a; font-variant-numeric: tabular-nums; }
.bl-vol.muted input, .bl-vol.muted span { opacity: .45; }
.bl-vol.muted output { color: #e0705a; }
.bl-settings button:not(.btn) {
  height: 32px; padding: 0 12px; cursor: pointer; font: 600 12.5px var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: #e5e2d5;
  background: linear-gradient(180deg, var(--steel-1), var(--steel-3)); border: 1px solid #000; border-radius: 4px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
}
.bl-settings button:not(.btn):hover { filter: brightness(1.25); }
.bl-mute[aria-pressed="true"] { color: #17140d !important; background: linear-gradient(180deg, #f07a62, #c23c26) !important; }
.bl-setfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
#lines.narrow .bl-sheet.bl-settings { padding: 18px 14px; }
#lines.narrow .bl-vol { grid-template-columns: 1fr 44px 74px; row-gap: 2px; }
#lines.narrow .bl-vol span { grid-column: 1 / 4; }
#lines.narrow .bl-vol span em { display: none; }

/* Requisition: nine units on parade, each with the kit it brings over its head. */
.bl-draft {
  width: min(1060px, 100%); max-height: 100%; overflow-y: auto; padding: 22px 24px 26px; text-align: center;
  background: linear-gradient(180deg, #2e3136, #15161a); border: 1px solid #000; border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(201, 169, 73, .6), 0 24px 70px #000; animation: bl-pop .25s ease-out;
}
.bl-draft h2 { margin: 0; font: 700 30px var(--f-head); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.bl-draft h2 .bl-secs { margin-left: 10px; font-size: 24px; letter-spacing: 0; color: #fff; }
.bl-draft .bl-lede { margin: 2px 0 12px; color: var(--text-dim); }
.bl-picks { display: grid; grid-template-columns: repeat(9, 1fr); gap: 8px; }
.bl-pick {
  --cc: #8f949b;
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 4px 8px; cursor: pointer; color: #fff;
  background: radial-gradient(ellipse at 50% 60%, color-mix(in srgb, var(--cc) 42%, transparent), transparent 64%), linear-gradient(180deg, #22252a, #101114);
  border: 2px solid var(--cc); border-radius: 6px; transition: transform .12s, box-shadow .12s;
}
.bl-pick:hover { transform: translateY(-6px); box-shadow: 0 0 18px color-mix(in srgb, var(--cc) 70%, transparent); }
.bl-pick img { width: 100%; aspect-ratio: 1; object-fit: contain; pointer-events: none; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .7)); transform-origin: 50% 100%; animation: bl-idle 2.4s ease-in-out infinite alternate; }
.bl-pit { position: absolute; left: 50%; top: -13px; translate: -50% 0; width: 30px; height: 30px; font-size: 16px; cursor: inherit; }
.bl-pit:hover { transform: none; }
.bl-pick b { min-height: 2.3em; font: 600 11.5px/1.15 var(--f-head); letter-spacing: .04em; text-transform: uppercase; }
.bl-ptraits { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--brass); }
.bl-pick.gone { cursor: default; opacity: .38; filter: grayscale(1); }
.bl-pick.gone:hover { transform: none; box-shadow: none; }
.bl-pby { position: absolute; left: 50%; top: 40%; translate: -50% -50%; padding: 3px; line-height: 0; background: #000; border-radius: 3px; }
#lines.narrow .bl-draft { padding: 16px 10px 14px; }
#lines.narrow .bl-draft h2 { font-size: 22px; }
#lines.narrow .bl-picks { grid-template-columns: repeat(3, 1fr); gap: 16px 6px; }
/* Requisition, in the War Council's manner: no sheet, the nine dealt straight over the darkened
   field, each naming the kit it brings, the taken ones struck out under their taker's flag. */
.bl-over:has(.bl-draft) { background: radial-gradient(ellipse 80% 70% at 50% 45%, rgba(8, 9, 7, .72), rgba(4, 5, 4, .93)); }
.bl-draft { width: min(1240px, 100%); padding: 6px 8px 12px; background: none; border: 0; box-shadow: none; animation: none; overflow: visible; }
.bl-draft h2 { font-size: 44px; letter-spacing: .2em; color: transparent; background: linear-gradient(180deg, #fff6cf, #f2d98b 45%, #b98a26); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 3px 0 #000) drop-shadow(0 0 22px rgba(255, 190, 70, .35)); }
.bl-draft h2 .bl-secs { color: #fff; -webkit-text-fill-color: #fff; }
.bl-draft .bl-lede { margin: 2px 0 12px; font-size: 16.5px; color: #d9d4c2; text-shadow: 0 1px 2px #000; }
.bl-draft .bl-picks { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px; margin-top: 34px; perspective: 1400px; }
.bl-draft .bl-pick {
  padding: 30px 6px 10px; gap: 5px; border-radius: 10px;
  background: radial-gradient(ellipse 90% 60% at 50% 46%, color-mix(in srgb, var(--cc) 46%, transparent), transparent 70%), linear-gradient(180deg, #2b2e34, #101114);
  box-shadow: inset 0 0 0 1px #000, 0 12px 26px rgba(0, 0, 0, .7), 0 0 20px color-mix(in srgb, var(--cc) 26%, transparent);
  animation: bl-deal .45s cubic-bezier(.2, .9, .25, 1.15) calc(var(--i, 0) * .05s) both; transition: transform .14s ease-out, box-shadow .14s, filter .14s;
}
.bl-draft .bl-pick:not(.gone):hover { transform: translateY(-10px) scale(1.05); filter: brightness(1.1); z-index: 2;
  box-shadow: inset 0 0 0 1px #000, 0 20px 34px rgba(0, 0, 0, .8), 0 0 34px color-mix(in srgb, var(--cc) 75%, transparent); }
.bl-draft .bl-pick:not(.gone):active { transform: translateY(-3px) scale(.99); }
.bl-draft .bl-pit { top: -20px; width: 42px; height: 42px; font-size: 22px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .8)); }
.bl-draft .bl-pick b { min-height: 2.3em; font-size: 13px; }
/* Its traits by name, one to a line: the flag it fights under and its branches. */
.bl-draft .bl-ptraits { flex-direction: column; align-items: flex-start; align-self: stretch; gap: 3px; min-height: 3.5em; padding: 0 5px; font-size: 12px; }
.bl-draft .bl-ptraits em { display: flex; align-items: center; gap: 5px; max-width: 100%; font: 600 11px/1.15 var(--f-ui, inherit); font-style: normal; color: #e8e2cf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-draft .bl-ptraits em > :first-child { flex: none; width: 20px; display: inline-flex; justify-content: center; color: var(--brass); }
#lines.narrow.land .bl-draft .bl-ptraits { min-height: 0; } #lines.narrow.land .bl-draft .bl-ptraits em { font-size: 8.5px; gap: 3px; }
/* What the unit brings, by name: the reason to take this one and not its neighbour. */
.bl-pkit { display: block; align-self: stretch; margin: 2px 2px 0; padding: 4px 2px 3px; min-height: 2.6em; font: 600 10.5px/1.15 var(--f-head); letter-spacing: .05em; text-transform: uppercase; color: #ffe27a;
  background: rgba(0, 0, 0, .45); border-top: 1px solid color-mix(in srgb, var(--cc) 55%, transparent); border-radius: 0 0 4px 4px; }
.bl-pkit u { display: block; text-decoration: none; font-size: 8.5px; letter-spacing: .14em; color: #a9a493; }
.bl-draft .bl-pick.gone { opacity: 1; filter: none; border-color: #3a3c41; background: linear-gradient(180deg, #1c1d21, #0d0e10); box-shadow: inset 0 0 0 1px #000; }
.bl-draft .bl-pick.gone > :not(.bl-pby) { opacity: .22; filter: grayscale(1); }
.bl-draft .bl-pby { top: 44%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 5px 7px 4px; font: 700 10px var(--f-head); font-style: normal; letter-spacing: .16em; text-transform: uppercase; color: #d9d4c2; background: rgba(0, 0, 0, .82); border: 1px solid #55585e; border-radius: 4px; line-height: 1; }
#lines.narrow .bl-over:has(.bl-draft) { padding: 8px 6px; }
#lines.narrow .bl-draft { padding: 0 2px 8px; max-height: 100%; overflow-y: auto; overflow-x: hidden; }
#lines.narrow .bl-draft h2 { font-size: 28px; letter-spacing: .12em; }
#lines.narrow .bl-draft .bl-lede { font-size: 14px; margin-bottom: 8px; }
#lines.narrow .bl-draft .bl-picks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 7px; margin-top: 24px; padding-bottom: 4px; }
#lines.narrow .bl-draft .bl-pick { padding: 22px 4px 6px; }
#lines.narrow .bl-draft .bl-pick img { width: 56%; }
#lines.narrow .bl-draft .bl-pit { top: -17px; width: 34px; height: 34px; font-size: 18px; }
#lines.narrow .bl-draft .bl-pick b { min-height: 0; font-size: 12px; }
#lines.narrow .bl-draft .bl-ptraits { gap: 1px; min-height: 0; padding: 0 3px; } #lines.narrow .bl-draft .bl-ptraits em { font-size: 10px; gap: 3px; } #lines.narrow .bl-draft .bl-ptraits em > :first-child { width: 16px; }
#lines.narrow.land .bl-draft .bl-picks { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; margin-top: 22px; }
#lines.narrow.land .bl-draft h2 { font-size: 20px; display: inline-block; margin-right: 10px; }
#lines.narrow.land .bl-draft .bl-lede { display: inline-block; margin: 0; font-size: 13px; }
#lines.narrow.land .bl-draft .bl-pick b { font-size: 10px; min-height: 2.3em; }
#lines.narrow.land .bl-pkit { font-size: 8.5px; }
#lines.narrow.land .bl-pkit u { display: none; }
@media (max-height: 700px) { #lines.narrow:not(.land) .bl-draft .bl-picks { gap: 22px 6px; margin-top: 22px; } #lines.narrow:not(.land) .bl-draft .bl-pick img { width: 58%; } #lines.narrow:not(.land) .bl-pkit u { display: none; } #lines.narrow:not(.land) .bl-pkit { min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .bl-draft .bl-pick { animation: none; } }
#lines.narrow .bl-pick img { width: 62%; }
.bl-end h2 { font-size: 54px; }
.bl-end.won h2 { color: #7a5c10; }
.bl-endsub { margin: 0 0 22px; font-size: 14px; }
.bl-places { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; margin: 0 auto 22px; padding: 0; max-width: 460px; list-style: none; text-align: left; }
.bl-places li { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; font-size: 13px; background: rgba(0, 0, 0, .08); border-radius: 3px; }
.bl-places li.me { background: rgba(31, 79, 122, .2); box-shadow: inset 0 0 0 1px rgba(31, 79, 122, .6); }
.bl-places i { width: 14px; font: 700 13px var(--f-head); font-style: normal; text-align: center; color: var(--ink); }
.bl-places b { flex: 1; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-places em { font: 600 12px var(--f-head); font-style: normal; }
#lines.narrow .bl-places { grid-template-columns: 1fr; }
.bl-endrow { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
/* The end of a game is a dark card like the war council, gold for a win and steel for a loss. */
.bl-sheet.bl-end { color: #d8d2bc; background: radial-gradient(120% 80% at 50% 0%, #2f2a1c 0%, #17181b 55%, #101114 100%); border: 1px solid #6a5a2c; box-shadow: 0 20px 70px #000, inset 0 0 0 1px rgba(255, 226, 122, .12), inset 0 3px 0 rgba(201, 169, 73, .55); }
.bl-end .bl-lede { color: #b9b29a; letter-spacing: .04em; }
.bl-end h2 { color: #e9e4d2; text-shadow: 0 3px 0 #000, 0 0 30px rgba(0, 0, 0, .8); }
.bl-end.won h2 { color: transparent; background: linear-gradient(180deg, #fff3b0, #f0c040 55%, #b9831a); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 3px 0 #000) drop-shadow(0 0 22px rgba(255, 200, 60, .45)); animation: bl-wonpulse 2.2s ease-in-out infinite; }
@keyframes bl-wonpulse { 50% { filter: drop-shadow(0 3px 0 #000) drop-shadow(0 0 36px rgba(255, 210, 80, .8)); } }
.bl-end .bl-endsub { color: #a8a08a; }
.bl-end .bl-places li { background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.bl-end .bl-places li.me { background: rgba(60, 130, 210, .22); box-shadow: inset 0 0 0 1px rgba(111, 183, 255, .7); }
.bl-end .bl-places i, .bl-end .bl-places b { color: #ece6d0; }
.bl-end .bl-places em { color: #c9a949; }
.bl-onward { margin: 18px 0 0; font-size: 13px; line-height: 1.6; color: #9a947f; }
.bl-onward a { color: #ffd98a; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.bl-onward a:hover { color: #fff3c4; }

/* Parts are plain supplies: a duller plate and a dashed edge. Orders are paper. */
.bl-it.part, .bl-uits i.part { background: radial-gradient(circle at 50% 38%, #2c2f35, #0b0c0e) !important; box-shadow: inset 0 0 0 2px #aeb4bc, inset 0 0 0 3px rgba(0, 0, 0, .5), 0 2px 5px rgba(0, 0, 0, .55) !important; }
.bl-it.order { background: radial-gradient(circle at 50% 38%, #3d3260, #100d1c) !important; box-shadow: inset 0 0 0 2px #b9a6ff, inset 0 0 0 3px rgba(0, 0, 0, .5), 0 2px 5px rgba(0, 0, 0, .55) !important; }
.tt-legend { margin: 0 12px 8px; padding: 8px 10px; border-radius: 4px; background: linear-gradient(90deg, rgba(240, 178, 60, .22), rgba(240, 178, 60, .05)); box-shadow: inset 3px 0 0 #f0b23c; }
.tt-legend b { display: flex; align-items: center; gap: 5px; font: 700 12px var(--f-head); letter-spacing: .1em; text-transform: uppercase; color: #ffd27a; }
.tt-legend p { margin: 3px 0 0; color: #e9e3cf; }
.bl-card.full:not(.promote) { filter: saturate(.6) brightness(.8); }
.tt-rec { display: grid; gap: 4px; padding: 0 12px 12px; }
.tt-rec em, .tt-from em { font: 600 10px var(--f-head); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: #8d8a7c; }
.tt-rec > div { display: flex; align-items: center; gap: 6px; padding: 3px 5px; border-radius: 4px; background: rgba(0, 0, 0, .28); opacity: .78; }
.tt-rec > div.have { opacity: 1; box-shadow: inset 0 0 0 1px #9be06c; }
.tt-rec .bl-it, .tt-from .bl-it { width: 28px !important; height: 28px !important; flex: none; cursor: help; }
.tt-rec u, .tt-from u { text-decoration: none; color: #8d8a7c; font-weight: 700; }
.tt-rec b { font: 600 12px var(--f-head); letter-spacing: .04em; color: #fff; }
.tt-from { display: flex; align-items: center; gap: 6px; padding: 0 12px 10px; }
.tt-from em { flex: 1; }

/* The second card (view.js showSub): what part of the first one means. */
#subtip { position: fixed; z-index: 201; display: none; pointer-events: none; }
#subtip.on { display: block; }
/* The first card can be pointed at: it stays, and its parts answer. */
#tooltip.bl { pointer-events: auto; }
#tooltip.bl [data-sub] { cursor: help; transition: box-shadow .1s, background .1s; }
#tooltip.bl [data-sub]:hover { box-shadow: inset 0 0 0 1px #fff3a8, 0 0 8px rgba(255, 243, 168, .35); }
#tooltip.bl .tt-item[data-sub]:hover { background: rgba(255, 255, 255, .06); box-shadow: none; }
.tt-live { display: flex; align-items: center; gap: 8px; padding: 9px 12px 0; font: 600 11.5px var(--f-ui); color: #d9d6c8; font-variant-numeric: tabular-nums; }
.tt-live > i { flex: 1; height: 7px; background: #000; border-radius: 2px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.tt-live > i b { display: block; height: 100%; background: linear-gradient(#8fe07a, #3f9a3a); }
.tt-live em { font-style: normal; color: #9fd0ff; }
.tt-live .tt-dealt { display: inline-flex; align-items: center; gap: 3px; color: #f0b98a; }
.tt-slots { display: flex; align-items: center; gap: 6px; padding: 0 12px 10px; }
.tt-slots em { flex: 1; font: 600 10px var(--f-head); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: #8d8a7c; }
.tt-slots .bl-it, .tt-slots .bl-itslot { width: 30px; height: 30px; cursor: help; }
.tt-slots .bl-itslot { display: block; border-radius: 4px; background: rgba(0, 0, 0, .4); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .13); cursor: default; }

/* ------------------------------------------------------------- tooltips
   The game's one #tooltip, dressed for this screen (view.js adds .bl while it
   is ours): a dark card that sits beside what it describes. */
:is(#tooltip, #subtip).bl {
  width: 292px; max-width: 292px; padding: 0; overflow: hidden; border-radius: 6px; color: #d9d6c8; font-size: 12.5px; line-height: 1.4;
  background: linear-gradient(180deg, #2a2d32, #141518); border: 1px solid #000;
  box-shadow: 0 0 0 1px rgba(201, 169, 73, .55), 0 14px 34px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .1);
  animation: bl-tip .12s ease-out;
}
@keyframes bl-tip { from { opacity: 0; transform: translateY(4px); } }
:is(#tooltip, #subtip).bl:has(> .tt-pad) { width: max-content; max-width: 250px; }
:is(#tooltip, #subtip).bl .ic { display: inline-flex; }
:is(#tooltip, #subtip).bl .ic svg { width: 1em; height: 1em; display: block; }
:is(#tooltip, #subtip).bl .flag { box-shadow: 0 0 0 1px rgba(0, 0, 0, .7); flex: none; }
.tt-pad { padding: 10px 12px; }
:is(#tooltip, #subtip).bl h5 { margin: 0 0 6px; padding: 0 0 5px; font: 600 13px var(--f-head); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); border-bottom: 1px solid rgba(255, 255, 255, .12); }
:is(#tooltip, #subtip).bl .tiny { font-size: 12px; color: #a9a595; }
:is(#tooltip, #subtip).bl .row span:last-child { color: #fff; }
:is(#tooltip, #subtip).bl hr { border-top-color: rgba(255, 255, 255, .12); margin: 6px 0; }

/* A unit: its picture, what it belongs to, five numbers, what it does. */
.tt-head { position: relative; display: flex; align-items: flex-end; height: 104px; background: #000 50% 30% / cover no-repeat; border-bottom: 2px solid var(--cc); }
/* The name plate is the shop card's: the colour of what the unit costs, with the cost on it. */
.tt-plate {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 12px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--cc) 70%, #0d0e10), color-mix(in srgb, var(--cc) 22%, #0d0e10)); border-top: 1px solid var(--cc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.tt-head .bl-sup { padding: 1px 7px; background: rgba(0, 0, 0, .55); border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); }
:is(#tooltip, #subtip).bl:has(> .tt-head.c1) { --tc: #8f949b; } :is(#tooltip, #subtip).bl:has(> .tt-head.c2) { --tc: #54a85b; } :is(#tooltip, #subtip).bl:has(> .tt-head.c3) { --tc: #4290dc; }
:is(#tooltip, #subtip).bl:has(> .tt-head.c4) { --tc: #b458d6; } :is(#tooltip, #subtip).bl:has(> .tt-head.c5) { --tc: #f0b23c; }
:is(#tooltip, #subtip).bl:has(> .tt-head) { box-shadow: 0 0 0 2px var(--tc), 0 0 18px color-mix(in srgb, var(--tc) 55%, transparent), 0 14px 34px rgba(0, 0, 0, .75); }
.tt-head b { flex: 1; min-width: 0; font: 700 17px/1.1 var(--f-head); letter-spacing: .06em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 3px #000; }
.tt-head i { font-style: normal; font-size: 14px; color: #c9a36a; text-shadow: 0 1px 2px #000; }
.tt-head i.s2 { color: #cfe4ff; }
.tt-head i.s3 { color: #ffe27a; }
.tt-head .bl-sup { font: 700 15px var(--f-head); color: var(--gold); }
.tt-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 12px 0; }
.tt-chips > span { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 7px; font-size: 11.5px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, .09); border-radius: 10px; }
.tt-chips .ic { font-size: 13px; color: var(--brass); }
.tt-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 10px 12px; }
.tt-stats > span { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 0 4px; background: rgba(0, 0, 0, .35); border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.tt-stats .ic { font-size: 14px; color: var(--brass); }
.tt-stats b { font: 700 14px var(--f-head); color: #fff; font-variant-numeric: tabular-nums; }
.tt-stats em { font: 600 8.5px var(--f-head); font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: #8d8a7c; }
.tt-abil { margin: 0 12px 12px; padding: 8px 10px; background: rgba(111, 183, 255, .09); border-left: 3px solid #6fb7ff; border-radius: 0 4px 4px 0; }
.tt-abil div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tt-abil b { font: 600 13px var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: #cfe4ff; }
.tt-abil em { display: inline-flex; align-items: center; gap: 3px; font: 600 12px var(--f-head); font-style: normal; color: #6fb7ff; }
.tt-abil p { margin: 3px 0 0; color: #c9c6b8; }
.tt-items { display: flex; flex-direction: column; gap: 7px; padding: 0 12px 12px; }
.tt-items.solo { padding-top: 12px; }
.tt-item { display: flex; align-items: center; gap: 10px; }
.tt-item .bl-it { flex: none; width: 32px; height: 32px; font-size: 17px; cursor: default; }
.tt-item b { display: block; font: 600 12.5px var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.tt-item p { margin: 0; font-size: 12px; color: #c9c6b8; }

.tt-best { display: flex; align-items: center; gap: 6px; padding: 0 12px 12px; }
.tt-best em { flex: 1; font: 600 10px var(--f-head); font-style: normal; letter-spacing: .14em; text-transform: uppercase; color: #8d8a7c; }
.tt-best .bl-it { width: 36px; height: 36px; cursor: default; }
.tt-best .bl-it.have { opacity: 1; box-shadow: inset 0 0 0 2px #9be06c, 0 0 8px rgba(155, 224, 108, .7) !important; }
.tt-fit { padding: 0 12px 12px; font-size: 12px; color: #a9a595; }
.tt-fit b { color: #9be06c; font-weight: 600; }
.tt-item .bl-it { width: 40px !important; height: 40px !important; }

/* A bonus: its patch, each tier with the one reached lit, and the units that count. */
.tt-thead { display: flex; align-items: center; gap: 10px; padding: 10px 12px 8px; background: rgba(0, 0, 0, .32); border-bottom: 1px solid rgba(255, 255, 255, .1); }
.tt-thead b { display: block; font: 700 16px/1.15 var(--f-head); letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.tt-thead em { font-style: normal; font-size: 11.5px; color: var(--brass); }
.tt-thead.on .bl-tmark { color: #2b1706; background: linear-gradient(160deg, #e2a25e, #8a5324); }
.tt-thead.mid .bl-tmark { color: #1b2026; background: linear-gradient(160deg, #f1f5f8, #8d98a2); }
.tt-thead.top .bl-tmark { color: #2e2104; background: linear-gradient(160deg, #fff3a8, #d09a25); }
.tt-tiers { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; }
.tt-tiers div { display: flex; align-items: flex-start; gap: 8px; opacity: .5; }
.tt-tiers div.on { opacity: 1; color: #fff; }
.tt-tiers b { flex: none; width: 20px; height: 20px; font: 700 12px/20px var(--f-head); text-align: center; color: #fff; background: rgba(255, 255, 255, .12); border-radius: 3px; }
.tt-tiers div.on b { color: #241d0c; background: linear-gradient(#fff3a8, #c9a949); }
/* Every unit that counts towards it, cheapest first, framed in the colour of its cost; the ones the player has are lit. */
.tt-units { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px 12px 12px; border-top: 1px solid rgba(255, 255, 255, .1); }
.tt-units i { position: relative; display: flex; flex-direction: column; align-items: center; font-style: normal; background: #0d0e10; border: 2px solid var(--cc); border-radius: 5px; overflow: hidden; opacity: .62; }
.tt-units i.have { opacity: 1; box-shadow: 0 0 9px var(--cc); }
.tt-units img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; filter: grayscale(.6); }
.tt-units i.have img { filter: none; }
/* The ones standing on the field: a bright edge and a tick. */
.tt-units i.field { border-color: #fff3a8; box-shadow: 0 0 0 1px #fff3a8, 0 0 12px rgba(255, 243, 168, .8); }
.tt-units i.field::after { content: '✓'; position: absolute; left: 0; top: 0; padding: 0 4px; font: 700 10.5px/15px var(--f-head); color: #17140d; background: #fff3a8; border-bottom-right-radius: 4px; }
.tt-units em { position: absolute; right: 0; top: 0; display: inline-flex; align-items: center; gap: 2px; padding: 0 4px; font: 700 10.5px/15px var(--f-head); font-style: normal; color: #fff; background: var(--cc); border-bottom-left-radius: 4px; }
.tt-units b { width: 100%; padding: 2px 2px 3px; font: 600 9.5px/1.1 var(--f-head); letter-spacing: .02em; text-align: center; color: #fff; background: color-mix(in srgb, var(--cc) 45%, #0d0e10); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* On a narrow screen the equipment has no column of its own: it sits in the bench's heading. */
.bl-nstash { display: none; gap: 3px; }

/* ---------------------------------------------------------------- narrow */
#lines.narrow {
  grid-template: calc(52px * var(--ui)) calc(46px * var(--ui)) calc(34px * var(--ui)) 1fr auto / minmax(0, 1fr);
  grid-template-areas: "top" "traits" "side" "main" "shop";
}
/* A phone held sideways: the field on the left at full height, the depot beside it. */
#lines.narrow.land {
  grid-template: calc(46px * var(--ui)) calc(38px * var(--ui)) calc(30px * var(--ui)) 1fr / minmax(0, 1fr) var(--shopw);
  grid-template-areas: "top top" "traits shop" "side shop" "main shop";
}
#lines.narrow.land .bl-shop { align-self: end; }
#lines.narrow.land .bl-main { gap: 3px; padding-top: 2px; }
#lines.narrow.land .bl-benchhead { min-height: 26px; margin-bottom: 0; }
#lines.narrow.land .bl-trait { height: 30px; }
#lines.narrow.land .bl-tmark { width: 26px; height: 30px; }
#lines.narrow.land .bl-sheet { max-height: calc(100vh - 16px); overflow-y: auto; padding: 12px 16px 14px; }
/* The commanders in one row across the screen: flag and Home Front, tap one to look over his army.
   Equipment is carried in the bench's heading instead, and the damage table is left out. */
#lines.narrow .bl-side { display: block; padding: 2px 6px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
#lines.narrow .bl-side::-webkit-scrollbar, #lines.narrow .bl-traits::-webkit-scrollbar { display: none; }
#lines.narrow .bl-traits { scrollbar-width: none; }
#lines.narrow .bl-side > :not(.bl-score) { display: none; }
#lines.narrow .bl-score { display: flex; gap: 4px; height: 100%; }
#lines.narrow .bl-row { flex: 1 0 auto; height: 28px; min-width: 0; margin: 0; padding: 0 5px; gap: 5px; }
#lines.narrow .bl-row[data-act]:hover { transform: none; }
#lines.narrow .bl-rank, #lines.narrow .bl-rname, #lines.narrow .bl-streak { display: none; }
#lines.narrow .bl-rhp { width: 30px; height: 16px; }
#lines.narrow .bl-rhp b { font-size: 11px; line-height: 16px; }
#lines.narrow .bl-rflag .flag { width: 20px !important; height: 14px !important; }
/* Fingers need more to press than a pointer does. */
#lines.narrow .bl-nstash .bl-it { width: 32px !important; height: 32px !important; }
#lines.narrow .bl-lock { min-width: 40px; height: 32px; }
#lines.narrow .bl-scout button { min-height: 36px; }

#lines.narrow .bl-traits { display: flex; align-items: center; gap: 5px; padding: 4px 6px; overflow-x: auto; overflow-y: hidden; }
#lines.narrow .bl-traits h4, #lines.narrow .bl-tbody { display: none; }
#lines.narrow .bl-traits .bl-hint { font-size: 11.5px; }
#lines.narrow .bl-toff { display: contents; }
#lines.narrow .bl-trait { flex: none; height: 36px; margin: 0; padding-right: 6px; gap: 5px; }
#lines.narrow .bl-tmark { width: 30px; height: 36px; font-size: 15px; }
#lines.narrow .bl-trait:not(.chip) .bl-tcount { width: 20px; height: 20px; font-size: 13px; line-height: 20px; }
#lines.narrow .bl-exit > span:not(.ic), #lines.narrow .bl-hpbar { display: none; }
#lines.narrow .bl-top { gap: 6px; padding: 0 6px; }
#lines.narrow .bl-exit, #lines.narrow .bl-speed, #lines.narrow .bl-help, #lines.narrow .bl-set { padding: 0 8px; min-width: 38px; min-height: 36px; }
#lines.narrow .bl-speed { display: none; }                  /* it is in the settings on a phone */
#lines.narrow .bl-speed { min-width: 34px; }
#lines.narrow .bl-stage { position: static; translate: none; flex: 1; min-width: 0; height: auto; padding: 0; gap: 2px; align-items: flex-start; background: none; clip-path: none; filter: none; }
#lines.narrow .bl-clock:not(.in) { left: 0; right: 0; height: 3px; }
#lines.narrow .bl-round { gap: 5px; }
#lines.narrow .bl-stage { overflow: hidden; }
#lines.narrow .bl-round b { font-size: 15px; letter-spacing: .06em; }
#lines.narrow .bl-pips { gap: 2px; }
#lines.narrow .bl-pip { width: 15px; height: 15px; font-size: 8px; }
#lines.narrow .bl-pip.now { width: 20px; height: 20px; font-size: 11px; }
#lines.narrow .bl-pip + .bl-pip::before { display: none; }
#lines.narrow .bl-foe { font-size: 12.5px; gap: 5px; }
#lines.narrow .bl-foe em { font-size: 9px; padding: 0 5px; }
#lines.narrow .bl-home > span { padding: 0 6px; gap: 5px; }
#lines.narrow .bl-main { gap: 6px; padding-top: 4px; }
#lines.narrow .bl-bench { width: calc(var(--cell) * 7); }
#lines.narrow .bl-benchhead { margin-bottom: 2px; min-height: 26px; gap: 6px; }
#lines.narrow .bl-slots { padding: 2px; gap: 2px; }
/* On a phone what stands over a unit is cut down to what is read in a fight: its health, its stars and
   the equipment it carries. The flag and the empty slots go, and the bars are thick enough to read. */
#lines.narrow .bl-board .bl-pl .bl-uflag { display: none; }
#lines.narrow .bl-board .bl-pl .bl-uits i.e { display: none; }
#lines.narrow .bl-pl .bl-bars i { height: 6px; }
#lines.narrow .bl-pl .bl-bars .mp { height: 3px; }
#lines.narrow .bl-board .bl-pl .bl-stars { font-size: calc(var(--cell) * .24); }
#lines.narrow .bl-nstash { display: inline-flex; flex: 1; justify-content: center; overflow: hidden; }
#lines.narrow .bl-benchhead { min-height: 34px; }
#lines.narrow .bl-shop { padding: 0 6px 6px; }
#lines.narrow .bl-strip { height: 34px; gap: 6px; grid-template-columns: auto 1fr; }
#lines.narrow .bl-odds { display: none; }
#lines.narrow .bl-gold { top: 0; height: 28px; padding: 0 10px; font-size: 16px; gap: 5px; border-radius: 3px; border-top-width: 1px; box-shadow: none; }
#lines.narrow .bl-gold b { font-size: 21px; }
#lines.narrow .bl-int i { width: 7px; height: 7px; margin: 0 1px; }
#lines.narrow .bl-deck { display: grid; grid-template: auto auto / minmax(0, 1fr) auto; gap: 5px; }
#lines.narrow .bl-econ { grid-area: 1 / 1; flex-direction: row; align-items: stretch; width: auto; gap: 4px; min-width: 0; }
#lines.narrow .bl-lvl { flex: none; width: 58px; height: 46px; padding: 4px 6px 0; flex-direction: column; align-items: flex-start; justify-content: flex-start; }
#lines.narrow .bl-lvl b { font-size: 17px; line-height: 1; }
#lines.narrow .bl-lvl b span { display: none; }
#lines.narrow .bl-lvl b::before { content: 'Lv '; font-size: 10px; color: var(--text-dim); }
#lines.narrow .bl-lvl em { font-size: 11.5px; line-height: 1.3; }
#lines.narrow .bl-xpbar { left: 4px; right: 4px; bottom: 2px; height: 3px; }
#lines.narrow .bl-ebtn { flex: 1; min-width: 0; overflow: hidden; height: 46px; padding: 0 7px; gap: 4px; justify-content: space-between; }
#lines.narrow .bl-ebtn small, #lines.narrow .bl-ebtn kbd, #lines.narrow .bl-eic { display: none; }
#lines.narrow .bl-ebtn b { font-size: 12.5px; letter-spacing: .02em; }
#lines.narrow .bl-ecost { font-size: 15px; }
#lines.narrow .bl-go { grid-area: 1 / 2; flex-direction: row; width: auto; }
#lines.narrow .bl-ready { height: 46px; padding: 0 9px; border-radius: 4px; }
#lines.narrow .bl-ready b { font-size: 14px; letter-spacing: .05em; white-space: nowrap; }
#lines.narrow .bl-ready small { display: none; }
#lines.narrow .bl-auto { display: none; }
#lines.narrow .bl-cards { grid-area: 2 / 1 / 3 / 3; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; flex: none; }
#lines.narrow .bl-deck, #lines.narrow .bl-strip { min-width: 0; max-width: 100%; }
#lines.narrow .bl-cfoot b { overflow-wrap: anywhere; }
#lines.narrow .bl-card { height: 120px; border-radius: 4px; }
#lines.narrow .bl-ctraits { flex-direction: row; gap: 5px; padding: 0 4px 4px; font-size: 13px; }
#lines.narrow .bl-ctraits em { display: none; }
#lines.narrow .bl-cfoot { flex-direction: column; align-items: flex-start; gap: 0; padding: 3px 4px; }
#lines.narrow .bl-cfoot b { max-width: 100%; font-size: 11.5px; line-height: 1.12; white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
#lines.narrow .bl-cfoot .bl-sup { font-size: 13.5px; }
#lines.narrow .bl-offers { grid-template-columns: 1fr; }
#lines.narrow .bl-otext { min-height: 0; }
#lines.narrow .bl-sheet { padding: 18px 16px 20px; }
#lines.narrow .bl-sheet h2 { font-size: 26px; }
#lines.narrow .bl-end h2 { font-size: 40px; }
.bl-steps > div > svg, .bl-steps > div > .ic, .bl-steps > div > span.icon { width: 36px; height: 36px; font-size: 36px; flex: none; color: var(--gold); }
#lines.narrow .bl-steps > div > svg, #lines.narrow .bl-steps > div > .ic { width: 26px; height: 26px; font-size: 26px; }
@media (max-height: 600px) { #lines.narrow .bl-howto .bl-tips { display: none; } }

/* The field taken hold of and slid under the eye (view.js setPan). */
#lines.panning, #lines.panning * { cursor: grabbing !important; }

/* On the 3D field the drop is a box on the ground (scene.js): this is only where it is tapped, and, once it is open, what was inside coming up out of it. */
.bl-crate.gl { animation: none; }
.bl-crate.gl::before, .bl-crate.gl::after, .bl-crate.gl .bl-cring, .bl-crate.gl .bl-cchute { display: none; }
.bl-crate.gl .bl-cbody, .bl-crate.gl b { opacity: 0; animation: none; }
.bl-crate.gl.taken { opacity: 0; }
.bl-crate.gl.got { translate: none; scale: none; opacity: 1; transition: none; animation: bl-crate-out 1.1s ease-out forwards; }
.bl-crate.gl.got .bl-cbody, .bl-crate.gl.got b { opacity: 1; }
@keyframes bl-crate-out {
  0%, 16% { opacity: 0; scale: .25; translate: 0 calc(var(--cell) * -.1); }
  42% { opacity: 1; scale: 1.5; translate: 0 calc(var(--cell) * -.85); }
  52% { scale: 1.3; }
  78% { opacity: 1; scale: 1.3; translate: 0 calc(var(--cell) * -.95); }
  100% { opacity: 0; scale: .9; translate: 0 calc(var(--cell) * -1.6); }
}

/* A legend in the shop: a gold frame that is lit from behind, a ribbon that says what it is, and light that keeps crossing it. */
.bl-card.c5 { border-color: #ffd76a; background: #1a1408; box-shadow: 0 0 0 1px #3a2a06, 0 0 0 3px #b8861c, 0 0 22px rgba(255, 196, 70, .6), 0 4px 10px rgba(0, 0, 0, .55), inset 0 0 18px rgba(255, 200, 80, .28); animation: bl-legend 2.4s ease-in-out infinite alternate; }
.bl-card.c5::before { content: '★ LEGEND'; position: absolute; z-index: 2; top: 0; left: 50%; translate: -50% 0; padding: 2px 10px 1px; border-radius: 0 0 5px 5px; white-space: nowrap;
  font: 700 9.5px var(--f-head); letter-spacing: .2em; color: #2a1c02; background: linear-gradient(#fff0a8, #e9b53a 55%, #b98416); box-shadow: 0 2px 5px rgba(0, 0, 0, .6); }
.bl-card.c5::after { background: linear-gradient(115deg, transparent 32%, rgba(255, 236, 170, .5) 50%, transparent 68%); animation: bl-legend-sheen 3.2s ease-in-out infinite; }
.bl-card.c5:hover::after { translate: none; transition: none; }
.bl-card.c5 .bl-cfoot { background: linear-gradient(90deg, rgba(120, 82, 10, .95), rgba(60, 40, 6, .95)); }
.bl-card.c5 .bl-cfoot b { color: #ffe9a0; }
.bl-card.c5 .bl-cart { filter: saturate(1.15) contrast(1.08); }
@keyframes bl-legend { from { box-shadow: 0 0 0 1px #3a2a06, 0 0 0 3px #b8861c, 0 0 14px rgba(255, 196, 70, .45), 0 4px 10px rgba(0, 0, 0, .55), inset 0 0 14px rgba(255, 200, 80, .2); } to { box-shadow: 0 0 0 1px #3a2a06, 0 0 0 3px #e9b53a, 0 0 30px rgba(255, 206, 90, .85), 0 4px 10px rgba(0, 0, 0, .55), inset 0 0 22px rgba(255, 200, 80, .36); } }
@keyframes bl-legend-sheen { 0%, 55% { translate: -120% 0; } 100% { translate: 120% 0; } }
/* On the field its plate is edged in gold, and its stars are gold whatever their number. */
.bl-u.c5 .bl-plhead { padding: 0 4px; border-radius: 3px; background: linear-gradient(rgba(120, 84, 12, .9), rgba(52, 36, 6, .9)); box-shadow: 0 0 0 1px #e9b53a, 0 0 8px rgba(255, 200, 80, .7); }
.bl-u.c5 .bl-bars .hp { box-shadow: 0 0 0 1px #e9b53a, 0 0 6px rgba(255, 200, 80, .55); }
/* Its card, when it is looked at. */
:is(#tooltip, #subtip).bl:has(> .tt-head.c5) { box-shadow: 0 0 0 1px #e9b53a, 0 0 26px rgba(255, 196, 70, .5), 0 12px 30px rgba(0, 0, 0, .7); }
@media (prefers-reduced-motion: reduce) { .bl-card.c5, .bl-card.c5::after { animation: none; } }

/* ------------------------------------------------------- read against any field */
/* What lies over the battlefield stands on its own dark plate with a light edge, so it reads the same
   on snow, on sand and at night: the plates are close to solid, the dim text is lifted, and the
   empty places (equipment, the bench) show where they are. */
#lines.gl .bl-trait { background: linear-gradient(90deg, rgba(13, 14, 16, .96), rgba(13, 14, 16, .82)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 2px 8px rgba(0, 0, 0, .5); color: #cfccbd; }
#lines.gl .bl-trait.on { box-shadow: inset 0 0 0 1px rgba(226, 162, 94, .7), 0 2px 8px rgba(0, 0, 0, .5); }
#lines.gl .bl-trait.mid { box-shadow: inset 0 0 0 1px rgba(210, 222, 232, .75), 0 2px 8px rgba(0, 0, 0, .5); }
#lines.gl .bl-trait.top { background: linear-gradient(90deg, rgba(74, 58, 14, .97), rgba(22, 21, 16, .86)); box-shadow: inset 0 0 0 1px rgba(255, 226, 122, .9), 0 0 12px rgba(255, 226, 122, .3), 0 2px 8px rgba(0, 0, 0, .5); }
#lines.gl .bl-trait.on, #lines.gl .bl-trait.mid, #lines.gl .bl-trait.top { color: #fff; }
#lines.gl .bl-trait.chip { opacity: 1; }
#lines.gl .bl-trait.off .bl-tmark { color: #d0d0c6; background: linear-gradient(160deg, #5c6065, #34373b); }
#lines.gl .bl-trait.off .bl-tcount { color: #c9c6b6; }
#lines.gl .bl-tsteps { color: #a09f92; }
#lines.gl .bl-tsteps i + i::before { color: #7d7c70; }
#lines.gl .bl-tsteps i.hit { color: #d2ccb0; }
#lines.gl .bl-row { background: linear-gradient(270deg, rgba(13, 14, 16, .96), rgba(13, 14, 16, .82)); border-color: rgba(255, 255, 255, .16); box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
#lines.gl .bl-row.me { background: linear-gradient(270deg, rgba(34, 78, 122, .97), rgba(30, 62, 96, .9)); border-color: rgba(131, 196, 255, .85); }
#lines.gl .bl-row.next { border-color: #f0604a; }
#lines.gl .bl-row.out { opacity: .55; }
#lines.gl .bl-rank { color: #c9c6b6; }
#lines.gl .bl-rname { color: #fff; text-shadow: 0 1px 2px #000; }
#lines.gl :is(.bl-traits, .bl-side) h4 { color: #ffe9a0; background: linear-gradient(90deg, rgba(10, 10, 8, .92), rgba(10, 10, 8, .6) 70%, transparent); }
#lines.gl .bl-itslot { border: 1px dashed rgba(255, 255, 255, .42); background: rgba(8, 9, 10, .72); }
#lines.gl .bl-dbar { background: rgba(8, 9, 10, .88); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
#lines.gl .bl-drow em { text-shadow: 0 1px 2px #000, 0 0 6px rgba(0, 0, 0, .8); }
#lines.gl .bl-cap { background: rgba(8, 9, 10, .88); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24), 0 2px 6px rgba(0, 0, 0, .5); }
#lines.gl .bl-slots { box-shadow: inset 0 2px 6px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .2), 0 3px 10px rgba(0, 0, 0, .55); }
#lines.gl .bl-slot { background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .13)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), inset 0 6px 10px rgba(0, 0, 0, .45); }
#lines.gl .bl-zoom button { color: #fff; border-color: rgba(255, 255, 255, .28); }
#lines.gl .bl-foe { color: #d6d3c4; }
#lines.gl .bl-hint { color: #dedbcc; text-shadow: 0 1px 2px #000, 0 0 8px rgba(0, 0, 0, .85); }

/* A standing gift of a unit that is not a legend: the same plate as a legend's, in the colour of what the unit costs. */
.tt-legend.gift { background: linear-gradient(90deg, rgba(184, 96, 220, .24), rgba(184, 96, 220, .05)); box-shadow: inset 3px 0 0 #b860dc; }
.tt-legend.gift b { color: #dfa8f6; }
.tt-legend.gift.c1, .tt-legend.gift.c2, .tt-legend.gift.c3 { background: linear-gradient(90deg, rgba(120, 190, 120, .22), rgba(120, 190, 120, .05)); box-shadow: inset 3px 0 0 #6fbf74; }
.tt-legend.gift:is(.c1, .c2, .c3) b { color: #a8e0a4; }
/* The orders a commander holds: a dark disc with the mark bright on it, edged in the colour of its tier. */
#lines.gl .bl-dir { color: #fff; background: radial-gradient(circle at 50% 35%, #3a3d44, #0d0e10); box-shadow: inset 0 0 0 2px var(--tc, #c9a949), 0 2px 6px rgba(0, 0, 0, .6); font-size: 22px; }
#lines.gl .bl-dir svg { filter: drop-shadow(0 0 3px color-mix(in srgb, var(--tc, #c9a949) 80%, transparent)); }
/* Equipment lies on a plate washed with its own colour, with a bright edge of it. */
.bl-it, .bl-uits i { box-shadow: inset 0 0 0 2px #e2c35c, inset 0 0 0 3px rgba(0, 0, 0, .55), 0 2px 5px rgba(0, 0, 0, .6) !important; }
.bl-it.part, .bl-uits i.part { box-shadow: inset 0 0 0 2px #aab2ba, inset 0 0 0 3px rgba(0, 0, 0, .55), 0 2px 5px rgba(0, 0, 0, .6) !important; }
.bl-ihue { background: radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--ih) 62%, #101114) 0%, color-mix(in srgb, var(--ih) 30%, #0c0d0f) 55%, color-mix(in srgb, var(--ih) 12%, #08090a) 100%); }

/* ------------------------------------------------------------------ less on the screen, and larger
   Only what is played with stays in sight: a working bonus and how far it is to its next step, each
   commander's flag and health, supplies, the depot. The rest (the steps of a bonus, the depot's odds,
   interest, a unit's country and its empty slots, the keys) is said in the card of the thing it belongs to. */
.bl-trait { align-items: center; }
.bl-trait .bl-tname { flex: 1; min-width: 0; }
.bl-tnum { flex: none; padding: 0 9px 0 4px; font: 700 17px var(--f-head); color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px #000; }
.bl-tnum i { font-style: normal; font-weight: 600; font-size: 13px; color: #b9b6a6; }
.bl-trait.top .bl-tnum { color: #ffe27a; }
.bl-trait.chip .bl-tnum { font-size: 14px; color: #d6d3c4; }
.bl-tmore { margin-top: 6px; padding: 5px 9px; font: 600 12.5px var(--f-ui); color: #c9c6b6; background: rgba(13, 14, 16, .8); border: 1px dashed rgba(255, 255, 255, .22); border-radius: 4px; cursor: help; width: fit-content; }
#lines:not(.narrow) .bl-tname { font-size: 15px; }
#lines:not(.narrow) .bl-trait.chip { height: 34px; margin: 0 0 4px; opacity: 1; }
#lines:not(.narrow) .bl-trait.chip .bl-tmark { width: 30px; height: 34px; font-size: 14px; }
#lines:not(.narrow) .bl-trait.chip .bl-tname { font-size: 13.5px; color: #c9c6b6; }
#lines:not(.narrow) .bl-row { height: 35px; gap: 9px; padding: 0 8px; }
#lines:not(.narrow) .bl-rname { font-size: 14.5px; }
#lines:not(.narrow) .bl-rhp { width: 64px; height: 22px; }
#lines:not(.narrow) .bl-rhp b { font-size: 14.5px; line-height: 22px; }
#lines:not(.narrow) :is(.bl-traits, .bl-side) h4 { font-size: 12.5px; }
#lines:not(.narrow) .bl-cfoot b { font-size: 14px; }
#lines:not(.narrow) .bl-ctraits em { font-size: 12.5px; }
#lines:not(.narrow) .bl-gold b { font-size: 30px; }
/* Over a unit: stars, then health, thick enough to read across the field. */
.bl-board .bl-pl .bl-stars { font-size: calc(var(--cell) * .24); }
.bl-pl .bl-bars i { height: max(7px, calc(var(--cell) * .1)); }
.bl-pl .bl-bars .mp { height: max(3px, calc(var(--cell) * .045)); }
#lines.narrow .bl-tnum { padding: 0 5px 0 2px; font-size: 13px; }
#lines.narrow .bl-tnum i { font-size: 10.5px; }
#lines.narrow .bl-trait .bl-tname, #lines.narrow .bl-tmore { display: none; }
/* The strip over the depot kept three places when the odds left it: supplies stay in the middle. */
#lines:not(.narrow) .bl-strip > .bl-gold { grid-column: 2; }
#lines:not(.narrow) .bl-strip > .bl-inc { grid-column: 3; }
.bl-dmgh.off { display: none; }
