/* The list of matches, and a match told one pass at a time. */

.m-empty { color: var(--parchment); font-size: calc(13 * var(--u)); line-height: 1.5; text-align: center; }

.m-list .m-row {
  display: grid;
  grid-template-columns: 1fr calc(92 * var(--u)) calc(56 * var(--u));
  gap: calc(8 * var(--u));
  align-items: center;
}
.m-who { font-weight: bold; overflow-wrap: anywhere; }
.m-nobody { font-weight: normal; font-style: italic; }
.m-out { text-align: right; font-weight: bold; }
.m-won { color: var(--green); }
.m-lost { color: var(--red); }
.m-drawn { color: var(--blue); }
.m-open { color: var(--ink); }

.m-box { height: 100%; overflow-y: auto; outline: none; color: #fff; background: rgba(12, 14, 70, 0.85); border-radius: calc(5 * var(--u)); padding: calc(3 * var(--u)); }
.m-step { display: grid; gap: calc(4 * var(--u)); }
.m-side { background: #2327a3; color: #fff; border: calc(1 * var(--u)) solid var(--amber); border-radius: calc(4 * var(--u)); padding: calc(4 * var(--u)); min-width: 0; }
.m-alias { margin: 0; font-size: calc(10 * var(--u)); line-height: 1.2; overflow-wrap: anywhere; }
.m-sub { margin: 0; font-size: calc(10 * var(--u)); }

.m-pass { grid-template-columns: 1fr calc(60 * var(--u)) 1fr; align-items: start; }
.m-passno { margin: 0; align-self: center; text-align: center; font: bold calc(14 * var(--u)) Georgia, 'Times New Roman', serif; color: var(--gold); }
.m-board { display: flex; gap: calc(6 * var(--u)); margin-top: calc(3 * var(--u)); }
.m-boards { display: flex; gap: calc(6 * var(--u)); }
.m-boards figure { margin: 0; }
.m-boards figcaption { text-align: center; font-size: calc(10 * var(--u)); }
.m-info { flex: 1; min-width: 0; display: grid; gap: calc(3 * var(--u)); align-content: start; }
.m-events { grid-column: 1 / -1; list-style: none; margin: calc(2 * var(--u)) 0 0; padding: 0; line-height: 1.2; }
.m-events li { margin-bottom: calc(1 * var(--u)); overflow-wrap: anywhere; }
.m-fall { font-weight: bold; color: var(--gold); }

.m-grid {
  display: grid;
  grid-template-columns: repeat(4, calc(11 * var(--u)));
  gap: calc(1 * var(--u));
  background: var(--line);
  border: calc(1 * var(--u)) solid var(--line);
}
.m-cell { height: calc(11 * var(--u)); background: #fff8e6; color: #fff; font: bold calc(10 * var(--u)) / calc(11 * var(--u)) Verdana, sans-serif; text-align: center; }
.m-lance .m-on { background: var(--red); }
.m-shield .m-on { background: var(--blue); }

.m-stamina { font-size: calc(10 * var(--u)); }
.m-bar { display: block; height: calc(7 * var(--u)); margin-top: calc(1 * var(--u)); background: #fff8e6; border: calc(1 * var(--u)) solid var(--line); }
.m-fill { display: block; height: 100%; background: #3fae3f; }

.m-riders { grid-template-columns: 1fr 1fr; gap: calc(10 * var(--u)); align-items: start; }
.m-gear { display: grid; grid-template-columns: auto 1fr; gap: 0 calc(8 * var(--u)); margin: calc(4 * var(--u)) 0; }
.m-gear dt { font-weight: bold; }
.m-gear dd { margin: 0; overflow-wrap: anywhere; }

.m-result { line-height: 1.2; font-size: calc(10.5 * var(--u)); }
.m-result p { margin: calc(2 * var(--u)) 0; overflow-wrap: anywhere; }
.m-headline { margin: 0; text-align: center; font: bold calc(18 * var(--u)) Georgia, 'Times New Roman', serif; color: var(--gold); overflow-wrap: anywhere; }
.m-levelup { font-weight: bold; color: var(--gold); }

.m-open-view > div:not(.m-passes) { background: rgba(12, 14, 70, 0.85); color: #fff; border-radius: calc(4 * var(--u)); padding: calc(4 * var(--u)) calc(6 * var(--u)); }
.m-open-view { grid-template-columns: calc(250 * var(--u)) 1fr; align-items: start; }
.m-open-view p { margin: 0 0 calc(3 * var(--u)); overflow-wrap: anywhere; }
.m-passes { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(8 * var(--u)); }
.m-passes section { background: #2327a3; color: #fff; border: calc(1 * var(--u)) solid var(--amber); border-radius: calc(4 * var(--u)); padding: calc(3 * var(--u)); }
.m-passes h3 { margin: 0 0 calc(2 * var(--u)); font-size: calc(10 * var(--u)); }
.m-waiting { font-weight: bold; color: var(--gold); }

/* The animation fills the stage, so the console, its strip and the Back flag go in front of it. */
#stage:has(.m-picture) #console { z-index: 3; }
#stage:has(.m-picture) :is(#strip, #back) { z-index: 4; }
#stage:has(.m-picture) #strip { background: linear-gradient(90deg, transparent calc(229 * var(--u)), #0b0d3c 0); }
#stage:has(.m-picture) #title { opacity: 0; }
#stage:has(.m-picture):not(:has(.m-ending)) :is(#status, #crest) { visibility: hidden; }
.m-view { pointer-events: none; }
.m-view button, .m-box, .m-panel { pointer-events: auto; }
.m-caption { display: flex; flex-direction: column; justify-content: center; overflow: hidden; color: #fff; font-size: calc(10.5 * var(--u)); line-height: 1.3; }
.m-caption p { margin: 0; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.m-ending :is(.m-hud, .m-passlabel), #stage:has(.m-ending) .m-caption { display: none; }
.m-canvas { display: block; width: calc(700 * var(--u)); height: calc(300 * var(--u)); }
.m-watch { color: #a33c00; }
.m-list .m-row { grid-template-columns: 1fr calc(92 * var(--u)) calc(112 * var(--u)); }

.m-hud { color: #fff; text-shadow: 0 0 calc(2 * var(--u)) #000, 0 0 calc(2 * var(--u)) #000; font-size: calc(10 * var(--u)); line-height: 1.2; }
.m-hud.m-right { text-align: right; }
.m-hud .m-alias { display: block; font-size: calc(12 * var(--u)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-hud .m-bar { display: block; height: calc(7 * var(--u)); margin: calc(1 * var(--u)) 0; background: #1b1712; border: calc(1 * var(--u)) solid #efe3c4; }
.m-hud.m-right .m-fill { margin-left: auto; }
.m-hud .m-fill { background: #3fae3f; transition: width 0.4s; }
.m-hud .m-fill.m-low { background: #d83a2a; }
.m-passlabel { text-align: center; color: var(--gold); font: bold calc(12 * var(--u)) Georgia, serif; text-shadow: 0 0 calc(2 * var(--u)) #000, 0 0 calc(2 * var(--u)) #000; }

.m-panel { max-height: calc(162 * var(--u)); overflow-y: auto; padding: calc(4 * var(--u)) calc(8 * var(--u)); font-size: calc(10 * var(--u)); line-height: 1.2; pointer-events: auto; }
.m-panel p { margin: calc(1 * var(--u)) 0; overflow-wrap: anywhere; }
.m-panel .m-headline { font-size: calc(13 * var(--u)); color: var(--gold); text-align: left; margin: 0; }
.m-panel .m-levelup { color: var(--gold); }

