:root {
  color-scheme: dark;
  font-family: "Courier New", monospace;
  color: #d8d1bb;
  background: #181914;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
.intro {
  max-width: 920px;
  padding: 9vh 7vw;
}
.eyebrow,
.note {
  color: #9f9f8b;
  font-size: 0.8rem;
  line-height: 1.7;
}
h1 {
  color: #e8863d;
  font-size: clamp(2.5rem, 8vw, 6rem);
  letter-spacing: -0.09em;
  margin: 0.4em 0;
}
.tagline {
  font-size: 1.7rem;
}
p {
  line-height: 1.6;
}
.button,
button {
  display: inline-block;
  background: #e8863d;
  color: #171914;
  border: 0;
  padding: 1rem 1.3rem;
  font:
    bold 1rem "Courier New",
    monospace;
  cursor: pointer;
  text-decoration: none;
}
.button {
  margin: 1.5rem 0;
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
:focus-visible {
  outline: 3px solid #eee9d6;
  outline-offset: 5px;
}
.game-shell {
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
header {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1px solid #585746;
}
header span {
  font-size: 0.7rem;
  color: #b2af98;
}
.viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
canvas {
  display: block;
  width: 100%;
  height: 100%;
}
#loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 2rem;
  background: #181914ee;
  text-align: center;
}
#loading[hidden] {
  display: none;
}

[hidden] {
  display: none !important;
}
.game-shell {
  background: #151714;
  color: #e8e4d6;
}
.game-header {
  padding: 0.7rem 1.5rem;
  min-height: 60px;
  align-items: center;
  background: #181b17;
}
.wordmark {
  color: #e8e4d6;
  font:
    800 1.2rem Arial,
    sans-serif;
  letter-spacing: -0.07em;
  text-decoration: none;
}
.wordmark span {
  color: #e8863d;
  font-size: inherit;
}
button.quiet {
  border: 1px solid #596050;
  background: #252b22;
  color: #e1e2d1;
  padding: 0.6rem 0.9rem;
  font-size: 0.8rem;
}
#loading.lobby-overlay {
  display: grid;
  grid-template-columns: minmax(300px, 470px) minmax(260px, 1fr);
  gap: 8vw;
  padding: clamp(1.2rem, 4vh, 3rem) 5vw;
  align-items: center;
  place-content: initial;
  text-align: left;
  overflow: auto;
  background: linear-gradient(110deg, #141713 47%, #252b21 100%);
  z-index: 2;
}
.join-panel {
  max-width: 470px;
}
.join-panel h1 {
  font:
    900 clamp(2.9rem, 6.3vw, 6rem)/0.86 Arial,
    sans-serif;
  letter-spacing: -0.075em;
  color: #e8e4d6;
  margin: 1.2rem 0;
}
.join-panel h1 span {
  color: #e8863d;
}
.join-copy {
  color: #acb09e;
  font:
    1rem/1.6 Arial,
    sans-serif;
  margin-bottom: 1.2rem;
}
label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: #b6bcaa;
  margin: 0.7rem 0;
}
input:not([type="checkbox"]),
select {
  display: block;
  width: 100%;
  border: 1px solid #4a5143;
  background: #20251e;
  color: #eeeadd;
  padding: 0.75rem;
  margin-top: 0.4rem;
  font:
    0.88rem "Courier New",
    monospace;
  border-radius: 0;
}
input[type="range"] {
  padding: 0;
  accent-color: #e8863d;
}
.form-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
button.primary {
  width: 100%;
  display: flex;
  justify-content: space-between;
  text-align: left;
  margin-top: 1.3rem;
  text-transform: uppercase;
  padding: 1rem;
}
button:hover {
  filter: brightness(1.12);
}
#status {
  color: #c6caba;
  font:
    0.8rem/1.5 Arial,
    sans-serif;
  min-height: 2.4em;
  margin: 0.8rem 0;
}
.control-note {
  font-size: 0.62rem;
  line-height: 1.7;
  color: #919c87;
  letter-spacing: 0.035em;
}
.arena-note {
  position: relative;
  height: 85%;
  min-height: 350px;
  border-left: 1px solid #56604c;
  display: flex;
  align-items: end;
  padding: 2.3rem;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, transparent 0 58px, #77846112 59px 60px),
    repeating-linear-gradient(90deg, transparent 0 58px, #77846112 59px 60px);
}
.arena-note::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 200px;
  top: 25%;
  right: 18%;
  border: 3px solid #677553;
  box-shadow:
    -65px 60px 0 -3px #252b21,
    -65px 60px 0 0 #596448;
  transform: skewY(-12deg);
  opacity: 0.6;
}
.arena-note > div {
  z-index: 1;
}
.arena-note h2 {
  font:
    800 clamp(2rem, 3vw, 3rem) Arial,
    sans-serif;
  letter-spacing: -0.05em;
  margin: 0;
}
.arena-note p {
  font-size: 0.76rem;
  color: #b4bda3;
}
.arena-number {
  position: absolute;
  left: 2rem;
  top: 1.2rem;
  color: #727e5b;
  font:
    900 7rem Arial,
    sans-serif;
  letter-spacing: -0.07em;
  opacity: 0.35;
}
.status-stamp {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid #8c985e;
  color: #b6c77b;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}
#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  text-shadow: 0 2px 2px #000;
}
.crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font:
    24px Arial,
    sans-serif;
  color: #f3f3cf;
}
.hud-bottom {
  position: absolute;
  bottom: 1.5rem;
  left: 2rem;
  right: 2rem;
  display: flex;
  gap: 2.5rem;
  align-items: end;
}
.hud-bottom > div:last-child {
  margin-left: auto;
  text-align: right;
}
.hud-bottom strong {
  display: block;
  font:
    800 clamp(1.3rem, 2.6vw, 2.8rem) Arial,
    sans-serif;
}
.hud-bottom small {
  font-size: 0.65rem;
  letter-spacing: 0.13em;
  color: #dadcba;
}
#health {
  color: #d2e599;
  font-size: 4rem;
}
#class-label {
  font-size: 0.8rem;
  color: #e8a56a;
}
#life-status {
  position: absolute;
  top: 57%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 1.1rem;
}
#network-status {
  position: absolute;
  top: 1rem;
  left: 1rem;
  color: #ffd78b;
  font-size: 0.8rem;
}
.settings-panel,
.score-panel {
  position: absolute;
  border: 1px solid #58604e;
  background: #1b211bef;
  z-index: 4;
  box-shadow: 0 12px 50px #0008;
}
.settings-panel {
  right: 1rem;
  top: 1rem;
  bottom: 1rem;
  width: min(390px, calc(100% - 2rem));
  padding: 1.4rem;
  overflow-y: auto;
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.panel-title h2,
.score-panel h2 {
  font:
    800 1.5rem Arial,
    sans-serif;
  letter-spacing: -0.045em;
}
.settings-panel h3 {
  font-size: 0.85rem;
  margin-top: 1.4rem;
}
output {
  float: right;
  color: #e7b378;
}
.check-label {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.8rem;
  letter-spacing: 0;
}
.binding-grid {
  display: grid;
  grid-template-columns: 1fr 130px;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
}
.binding-grid button {
  background: #313a2b;
  color: #dce3c9;
  padding: 0.4rem 0.6rem;
  border: 1px solid #5a644e;
  font-size: 0.72rem;
}
button.danger {
  color: #efad80;
  margin-top: 0.6rem;
}
.score-panel {
  top: 8%;
  right: 3%;
  width: min(680px, 94%);
  padding: 1.5rem;
  max-height: 88%;
  overflow: auto;
}
.score-panel[data-results] {
  right: 50%;
  transform: translateX(50%);
  background: #1b211b;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.8rem;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid #4a5342;
  padding: 0.8rem 0.6rem;
  white-space: nowrap;
}
th {
  font-size: 0.66rem;
  color: #a9b895;
}
.local-player {
  color: #dfc18c;
  background: #6c744e24;
}
#team-score {
  font-size: 0.8rem;
  color: #d4d8be;
}
@media (max-width: 760px) {
  #loading.lobby-overlay {
    grid-template-columns: 1fr;
  }
  .arena-note {
    display: none;
  }
  .join-panel {
    margin: auto;
    width: 100%;
  }
  .hud-bottom {
    left: 1rem;
    right: 1rem;
    gap: 1rem;
  }
  .game-header {
    padding: 0.7rem;
  }
  .game-header > span {
    display: none;
  }
}
