@font-face {
  font-family: GameMono;
  src: local("Menlo");
}
* {
  box-sizing: border-box;
}
:root {
  --ink: #172b24;
  --muted: #728177;
  --paper: #f4f3e9;
  --line: #d8ddcf;
  --lime: #d6f56b;
  --dark: #14271f;
  --red: #e85246;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}
button,
select {
  font: inherit;
}
button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
canvas:focus-visible {
  outline: 3px solid #d3b625;
  outline-offset: 4px;
}
button {
  border: 0;
}
button[hidden] {
  display: none;
}
.masthead {
  height: 64px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4.2vw;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -1px;
  color: inherit;
  text-decoration: none;
}
.mark {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  background: var(--ink);
  color: var(--lime);
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 35px;
  line-height: 1;
}
.edition {
  font:
    10px GameMono,
    monospace;
  letter-spacing: 0;
  border-left: 1px solid var(--line);
  padding-left: 12px;
  margin-left: 5px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
}
.ai-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #69a26b;
  display: inline-block;
}
.quiet {
  background: transparent;
  padding: 8px 0;
  color: var(--muted);
  font-size: 11px;
}
.header-right .quiet {
  border-left: 1px solid var(--line);
  padding-left: 18px;
  margin-left: 16px;
}
main {
  max-width: 1510px;
  margin: auto;
  padding: 16px 4.2vw 0;
}
.eyebrow {
  font:
    9px GameMono,
    monospace;
  letter-spacing: 1.3px;
  font-weight: bold;
}
.header-tagline {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  text-align: right;
}
.header-tagline em {
  font-family: Georgia, serif;
}
.arena-layout {
  display: grid;
  /* Reserve header, scoreboard, player bar, key guide and breathing room. */
  --match-chrome: 320px;
  --pitch-width: calc((100dvh - var(--match-chrome)) * 790 / 820);
  grid-template-columns: minmax(320px, min(640px, var(--pitch-width))) 255px;
  justify-content: center;
  gap: 30px;
  align-items: start;
}
.arena {
  min-width: 0;
}
.scoreboard {
  height: 67px;
  background: var(--dark);
  color: #f3f1e6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 20px;
}
.team-score {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.controller-label {
  font:
    8px GameMono,
    monospace;
  color: #acb8a5;
  border: 1px solid #47564a;
  padding: 5px;
}
.ai-label {
  color: var(--lime);
  border-color: #647b3b;
}
.team-score i {
  width: 6px;
  height: 25px;
  display: inline-block;
  background: var(--red);
}
.score {
  font:
    30px GameMono,
    monospace;
  display: flex;
  gap: 15px;
  align-items: center;
}
.score-dash {
  font-size: 18px;
  color: #8f9e90;
}
.clock {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 3px;
  padding-left: 20px;
  border-left: 1px solid #3b4d3b;
}
.clock b {
  font:
    18px GameMono,
    monospace;
  color: var(--lime);
}
.clock span {
  font:
    7px GameMono,
    monospace;
  letter-spacing: 1px;
  color: #acb8a5;
}
.pause-button {
  color: #e9eddd;
  background: #294133;
  padding: 7px 10px;
  font-size: 16px;
}
.pitch-shell {
  position: relative;
  background: #254938;
  overflow: hidden;
  line-height: 0;
}
canvas {
  display: block;
  width: 100%;
  aspect-ratio: 790/820;
  image-rendering: auto;
  touch-action: none;
}
.match-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(90deg, #132b27dc, #132b275c);
}
.match-overlay[hidden] {
  display: none;
}
.overlay-inner {
  width: 100%;
  padding: 25px 10%;
  color: var(--paper);
  line-height: 1.5;
}
.overlay-inner .eyebrow {
  color: var(--lime);
}
.overlay-inner h2 {
  font-size: clamp(38px, 5.4vw, 77px);
  line-height: 0.97;
  font-weight: 900;
  letter-spacing: -3px;
  margin: 20px 0;
}
.overlay-inner p {
  font-size: 14px;
  line-height: 1.65;
  color: #dee5d7;
  margin: 0 0 25px;
  max-width: 330px;
}
.primary {
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  padding: 16px 22px;
  min-width: 177px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  transition: background 0.15s;
}
.primary:hover {
  background: #e1ffa0;
}
.primary span {
  font-size: 22px;
  line-height: 0;
}
.overlay-footnote {
  display: block;
  margin-top: 23px;
  font:
    8px GameMono,
    monospace;
  letter-spacing: 1px;
  color: #b7c6af;
}
.pitch-footer {
  height: 45px;
  background: var(--dark);
  color: #e5edda;
  padding: 0 17px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10px;
}
.pitch-footer > span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.pitch-footer b {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.selection-icon {
  border: 4px solid transparent;
  border-top: 6px solid var(--lime);
  transform: translateY(2px);
}
#player-role {
  color: #819982;
  font:
    8px GameMono,
    monospace;
}
.stamina {
  height: 3px;
  width: 55px;
  background: #46583a;
}
.stamina i {
  height: 3px;
  display: block;
  background: var(--lime);
  width: 100%;
}
#direction-label {
  margin-left: auto;
  font:
    8px GameMono,
    monospace;
  letter-spacing: 1px;
  color: #bbcaaf;
}
kbd {
  font:
    9px GameMono,
    monospace;
  color: var(--ink);
  border-bottom: 1px solid #c4cdbb;
  padding: 3px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 10px;
  margin-bottom: 15px;
}
.section-title h2 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin: 0;
}
.section-title > span {
  font:
    9px GameMono,
    monospace;
  color: var(--muted);
}
.team-picker {
  display: block;
}
.team-picker > span,
.small-label {
  font:
    8px GameMono,
    monospace;
  letter-spacing: 1.1px;
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}
.team-picker select {
  width: 100%;
  border: 1px solid var(--line);
  padding: 11px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  border-radius: 0;
}
.team-picker select:disabled {
  opacity: 0.6;
}
.versus-rule {
  text-align: center;
  position: relative;
  height: 26px;
  display: grid;
  place-items: center;
}
.versus-rule span {
  font:
    italic 14px Georgia,
    serif;
  color: var(--muted);
}
.text-button {
  display: flex;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  font-size: 10px;
  padding: 14px 0;
  color: var(--ink);
}
.ai-section {
  margin-top: 20px;
}
.decision-status {
  font:
    9px GameMono,
    monospace;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  gap: 8px;
}
.current-decision {
  padding: 22px 0 13px;
}
.current-decision p {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.8px;
  margin: 8px 0 12px;
  min-height: 53px;
}
.current-decision > span:last-child {
  font:
    9px GameMono,
    monospace;
  color: var(--muted);
  text-transform: uppercase;
}
.probabilities {
  min-height: 70px;
}
.probability {
  margin-bottom: 10px;
}
.probability-label {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
  gap: 8px;
  margin-bottom: 5px;
}
.probability-label span:first-child {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.probability-track {
  height: 3px;
  background: var(--line);
}
.probability-track i {
  height: 3px;
  display: block;
  background: #51775b;
}
.probability:first-child .probability-track i {
  background: #7b9c37;
}
.telemetry {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--line);
}
.telemetry > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.telemetry b {
  font:
    19px GameMono,
    monospace;
}
.telemetry span {
  font-size: 8px;
  color: var(--muted);
}
.honesty {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  margin: 17px 0 0;
}
.secondary {
  width: 100%;
  padding: 12px;
  background: var(--ink);
  color: var(--paper);
  margin-top: 17px;
}
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding: 16px 0 22px;
  font-size: 10px;
  color: var(--muted);
}
.site-footer b {
  color: var(--ink);
}
.goal-flash {
  position: absolute;
  top: 22px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--lime);
  font-size: 25px;
  font-weight: 900;
  line-height: 1.2;
  text-shadow: 0 2px 6px #152c21;
  pointer-events: none;
}
.muted {
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}
dialog {
  background: var(--paper);
  border: 0;
  padding: 30px;
  color: var(--ink);
  max-width: min(850px, 94vw);
  max-height: 87vh;
  overflow: auto;
}
dialog::backdrop {
  background: #14271fc9;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.dialog-head h2 {
  font-size: 26px;
  letter-spacing: -0.8px;
  margin: 5px 25px 12px 0;
}
.dialog-head button {
  background: transparent;
  font-size: 28px;
  color: var(--ink);
  padding: 0 5px;
}
dialog p {
  font-size: 13px;
  line-height: 1.7;
}
dialog a {
  color: #385b35;
}
#squad-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin: 20px 0;
}
#squad-columns h3 {
  font-size: 16px;
}
.squad-row {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.squad-row span {
  font:
    9px GameMono,
    monospace;
  color: var(--muted);
}
.squad-row select {
  width: 100%;
  padding: 6px 3px;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-size: 12px;
}
.touch-controls {
  display: none;
}
@media (min-width: 1550px) {
  main {
    padding-left: 35px;
    padding-right: 35px;
  }
}
@media (max-width: 1100px) {
  .arena-layout {
    grid-template-columns: minmax(320px, min(640px, var(--pitch-width))) 220px;
    gap: 20px;
  }
  .scoreboard {
    gap: 10px;
    padding: 0 12px;
  }
  .controller-label {
    display: none;
  }
  .score {
    gap: 10px;
  }
  .clock {
    padding-left: 12px;
  }
  .current-decision p {
    font-size: 22px;
  }
  .overlay-inner h2 {
    font-size: clamp(36px, 4.8vw, 55px);
  }
  .overlay-inner {
    padding: 20px 8%;
  }
}
@media (max-width: 760px) {
  .masthead {
    height: 60px;
    padding: 6px 12px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 12px;
  }
  .wordmark {
    font-size: 16px;
    gap: 7px;
  }
  .mark {
    width: 24px;
    height: 24px;
    font-size: 25px;
  }
  .edition {
    display: none;
  }
  .header-right {
    display: contents;
  }
  .header-tagline {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 12px;
  }
  .header-right .quiet {
    grid-column: 2;
    grid-row: 1;
    padding: 4px 0;
    border: 0;
    margin: 0;
    font-size: 12px;
  }
  main {
    padding: 4px 0 0;
  }
  .eyebrow {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .arena-layout {
    grid-template-columns: 1fr;
    gap: 23px;
  }
  .scoreboard {
    height: 44px;
    gap: 10px;
    padding: 0 10px;
  }
  .team-score {
    font-size: 18px;
    gap: 7px;
  }
  .team-score i {
    width: 4px;
    height: 19px;
  }
  .score {
    font-size: 24px;
    gap: 8px;
  }
  .clock {
    padding-left: 10px;
  }
  .clock b {
    font-size: 14px;
  }
  .clock span {
    font-size: 6px;
  }
  .pause-button {
    font-size: 14px;
    padding: 6px 8px;
  }
  .overlay-inner {
    padding: 18px 9%;
  }
  .overlay-inner h2 {
    font-size: 43px;
    margin: 12px 0;
    letter-spacing: -2px;
  }
  .overlay-inner p {
    font-size: 11px;
    margin-bottom: 13px;
    line-height: 1.5;
  }
  .primary {
    padding: 12px 16px;
    min-width: 145px;
    font-size: 12px;
  }
  .overlay-footnote {
    font-size: 6px;
    margin-top: 13px;
  }
  .pitch-footer {
    padding: 0 10px;
    height: 28px;
    font-size: 9px;
    gap: 6px;
  }
  #direction-label {
    font-size: 7px;
  }
  .stamina {
    width: 33px;
  }
  .dugout {
    padding-inline: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 18px;
  }
  .dugout > .section-title,
  .dugout > .text-button,
  .dugout > .ai-section,
  .dugout > .decision-status,
  .dugout > .current-decision,
  .dugout > .probabilities,
  .dugout > .telemetry,
  .dugout > .honesty,
  .dugout > .secondary {
    grid-column: 1/-1;
  }
  .versus-rule {
    display: none;
  }
  .team-picker select {
    font-size: 13px;
  }
  .ai-section {
    margin-top: 12px;
  }
  .current-decision p {
    font-size: 25px;
    min-height: 0;
  }
  .current-decision {
    padding-top: 17px;
  }
  .probabilities {
    min-height: 0;
  }
  .site-footer {
    margin-inline: 14px;
    gap: 15px;
    font-size: 8px;
    line-height: 1.6;
  }
  .site-footer .quiet {
    font-size: 9px;
    min-width: 115px;
  }
  #squad-columns {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  dialog {
    padding: 23px;
  }
  .goal-flash {
    font-size: 19px;
  }
}
@media (max-width: 380px) {
  .overlay-inner {
    padding: 10px 8%;
  }
  .overlay-inner h2 {
    font-size: 32px;
    margin: 8px 0;
  }
  .overlay-inner p {
    line-height: 1.35;
    margin-bottom: 10px;
  }
  .overlay-footnote {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
