html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #05030a;
}

#game {
  width: 100%;
  height: 100%;
}

#game canvas {
  display: block;
  image-rendering: pixelated;
  cursor: crosshair;
}

.name-screen {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(20rem, calc(100% - 2rem));
  height: fit-content;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgb(5 3 10 / 92%);
  border: 1px solid #8fd8ff;
  color: #d8f8ff;
  font: 16px/1.4 monospace;
}

.name-screen[hidden] {
  display: none;
}

.name-screen h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  letter-spacing: 0.15em;
}

.name-screen input,
.name-screen button {
  font: inherit;
  padding: 0.4rem 0.6rem;
  color: #d8f8ff;
  background: #120c1f;
  border: 1px solid #8fd8ff;
}

.name-screen button {
  cursor: pointer;
}

.name-screen button:hover,
.name-screen button:focus-visible,
.name-screen input:focus-visible {
  outline: 2px solid #fff08a;
  outline-offset: 1px;
}

.name-error {
  min-height: 1.4em;
  margin: 0;
  color: #ff9a8a;
}

/* The squadron join screen (#42), in the name screen's style. */
.squadron-screen {
  width: min(34rem, calc(100% - 2rem));
}

.squadron-screen h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: normal;
  color: #8fd8ff;
}

.squadron-why {
  margin: 0;
  font-size: 13px;
  color: #b4ff8c;
}

.squadron {
  display: grid;
  grid-template-columns: 7rem 1fr auto;
  gap: 0.2rem 0.75rem;
  align-items: center;
  padding: 0.5rem 0.6rem;
  border: 1px solid #3a2f55;
  background: #120c1f;
}

.squadron.picked {
  border-color: #fff08a;
}

.squadron .name {
  font-size: 1.1rem;
  letter-spacing: 0.08em;
}

.squadron .ai {
  color: #8fd8ff;
}

.squadron button {
  grid-row: span 2;
}

.squadron .seats-pips {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: #8fd8ff;
}

.squadron .note {
  font-size: 12px;
  color: #b9a0ff;
}

#squadron-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.squadron-full {
  margin: 0;
  font-size: 12px;
  color: #6d6488;
}

.squadron-new {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.6rem;
  border: 1px dashed #8fd8ff;
}

/* The loadout screen (#78), in the squadron screen's style: the sketch in #78. */
.loadout-screen {
  width: min(46rem, calc(100% - 2rem));
  padding: 1.25rem 1.5rem;
  gap: 0.8rem;
}

.loadout-screen h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: normal;
  color: #8fd8ff;
  display: flex;
  justify-content: space-between;
}

.loadout-screen h2 span {
  color: #6d6488;
  font-size: 12px;
}

.loadout-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.loadout-slot h3 {
  margin: 0 0 0.4rem;
  font-size: 12px;
  font-weight: normal;
  color: #8fd8ff;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.loadout-slot.picked h3 {
  color: #fff08a;
}

.name-screen .loadout-part {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 0.35rem;
  padding: 0.25rem 0.4rem;
  text-align: left;
  font-size: 13px;
  border: 1px solid #3a2f55;
  background: #120c1f;
}

.name-screen .loadout-part.fitted {
  border-color: #fff08a;
}

.name-screen .loadout-part.locked {
  opacity: 0.35;
  cursor: default;
}

.loadout-part .icon {
  width: 32px;
  height: 32px;
  flex: none;
  background-size: 480px 32px;
  background-position: 0 0;
  image-rendering: pixelated;
}

.loadout-part .hint {
  display: block;
  font-size: 11px;
  color: #6d6488;
}

.loadout-part.fitted .hint {
  color: #fff08a;
}

.loadout-hangar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.6rem;
  font-size: 13px;
  border: 1px solid #3a2f55;
  background: #120c1f;
}

.loadout-hangar button {
  white-space: nowrap;
}

.loadout-keys {
  margin: 0;
  font-size: 12px;
  color: #6d6488;
}

.loadout-keys b {
  color: #d8f8ff;
  font-weight: normal;
}

/* A locked part can't be fitted, so it doesn't light up under the mouse. */
.name-screen .loadout-part:disabled:hover {
  outline: none;
}

.name-screen.victory-screen {
  width: min(44rem, calc(100% - 2rem));
  padding: 1.25rem 1.5rem;
  gap: 0.8rem;
}

.victory-screen h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: normal;
  color: #fff08a;
  letter-spacing: 0.15em;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.victory-screen h2 span {
  color: #8fd8ff;
  letter-spacing: 0;
  font-size: 13px;
}

.victory-screen .squadron-why {
  margin: 0;
}

.victory-stats {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.victory-stats th {
  font-weight: normal;
  font-size: 11px;
  color: #8fd8ff;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: right;
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid #3a2f55;
}

.victory-stats td {
  text-align: right;
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid #1d1530;
}

.victory-stats th:first-child,
.victory-stats td:first-child {
  text-align: left;
}

.victory-stats tr.you td {
  color: #fff08a;
}

.victory-stats td.dim {
  color: #6d6488;
}

.victory-stats tfoot td {
  color: #8fd8ff;
  border-bottom: none;
}
