/* Battles (M, watch_sheet.rs): the tab on the book (ui.css, "The book"). The left page lists the
   battles as ledgers, each its crossed blades, kind and ground over who fought and when; the right
   page shows the one picked: its sides face to face across the blades, its figures, and Watch. */
.battles-book {
  .verso .page-body > :is(.note, .problem, .muted) { margin: 4px 0 18px; }
  .verso section h3 { margin-bottom: 8px; }
  .verso section + section { margin-top: 26px; }
  .ledger.fights > .fight { grid-template-columns: 52px minmax(0, 1fr) auto; padding: 10px 4px; }
  .fight {
    .what { min-width: 0; font: 400 16px/1.25 var(--face); color: var(--sumi-soft); }
    .what b { font-weight: 600; color: var(--sumi); }
    .what small { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
      font: italic 400 13.5px/1.3 var(--face); color: var(--sumi-faint); }
  }
  /* On screen now: the jade diamond of presence, as on the strip. */
  .on-screen { display: inline-flex; align-items: center; gap: 8px; padding-right: 6px; font-size: 10.5px; color: var(--jade-ink);
    &::before { content: ""; width: 7px; height: 7px; rotate: 45deg; background: currentColor; } }

  /* The battle picked. */
  .recto .page-body { display: flex; flex-direction: column; }
  .kicker { margin: 4px 0 6px; font-size: 10.5px; }
  .versus { display: flex; align-items: center; justify-content: center; gap: 22px 36px; flex-wrap: wrap; margin: 22px 0 30px; }
  .side { display: grid; justify-items: center; gap: 10px; text-align: center;
    .faces { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 22px; }
    .face { display: grid; justify-items: center; gap: 10px; }
    b { font: 600 18px/1.2 var(--face); color: var(--sumi); }
    > .caps { font-size: 10px; }
    &.ours > .caps { color: var(--gold-ink); }
    &.monsters .faces { flex-direction: column; gap: 4px; }
  }
  .blades img { display: block; width: 46px; height: 46px; }
  .figures { gap: 16px 44px; padding: 16px 2px 0; border-top: 1px solid var(--sumi-line);
    .figure b { font-size: 34px; }
    .figure b .of { font-size: 17px; }
    .figure span { margin-top: 6px; font-size: 13.5px; }
  }
  .call { margin-top: 30px;
    .on-screen { font-size: 11.5px; } }
  /* Nothing to pick: the Elder Hall in ink. */
  .hall { display: grid; justify-items: center; align-content: center; gap: 18px; flex: 1; padding-bottom: 40px; text-align: center;
    img { width: 180px; height: 180px; opacity: 0.85; }
    .lede { max-width: 300px; }
  }
}
/* A short view: the faces and figures draw closer, so Watch stays on the page. */
@media (max-height: 800px) {
  .battles-book {
    .verso section + section { margin-top: 16px; }
    .ledger.fights > .fight { padding: 7px 4px; }
    .versus { margin: 12px 0 18px; }
    .side .portrait { width: 72px; height: 72px; }
    .figures { padding-top: 12px; }
    .figures .figure b { font-size: 28px; }
    .call { margin-top: 18px; }
  }
}

/* The strip over the view while a battle is watched (watch_panel.rs): frames of lacquer at the top middle. */
#watching {
  position: fixed; top: 12px; left: 12px; right: 12px; z-index: 4; display: flex;
  flex-direction: column; align-items: center; gap: 6px; pointer-events: none;
  font: 14px/1.4 var(--face); color: var(--paper);
  &[hidden] { display: none; }
  .bar, .watched, .ended { pointer-events: auto; }
  .bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 16px;
    padding: 7px 16px 7px 18px; max-width: min(100%, 980px); }
  .top, .fighters, .controls, .end { display: flex; align-items: center; gap: 4px 12px; }
  .top {
    gap: 6px; white-space: nowrap; color: var(--muted);
    b { color: var(--paper); }
  }
  .mode {
    font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted);
    &.live { color: var(--paper); }
  }
  /* Live, and watched: a jade diamond, presence. */
  .mode.live::before, .watched i { content: ""; display: inline-block; width: 7px; height: 7px;
    margin-right: 8px; rotate: 45deg; background: var(--jade); box-shadow: 0 0 6px var(--jade-glow); vertical-align: 1px; }
  .sep { color: var(--faint); }
  .fighter { white-space: nowrap; }
  span.fighter { color: var(--faint); }
  .controls { flex-wrap: nowrap; }
  .seek { width: min(220px, 28vw); height: 20px; margin: 0 4px; }
  .time { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .hint { flex-basis: 100%; margin: 0; text-align: center; font-size: 12px; color: var(--muted); }
  .watched, .ended { padding: 5px 12px 5px 14px; font-size: 13px; }
  /* A line of status, not a card: no edge. */
  :is(.watched, .ended)::before { content: none; }
  .ended { color: var(--muted); }
}
