:root {
  --bg: #14161f;
  --panel: #1e2130;
  --line: #2e3247;
  --txt: #e9ecf5;
  --mut: #9aa1b9;
  --acc: #ff7b22;
  --acc2: #ffd84a;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: Inter, system-ui, sans-serif;
  min-height: 100%;
}
body {
  display: flex;
  justify-content: center;
  padding: 18px;
}
h1 {
  font-family: "Press Start 2P", monospace;
  font-size: 30px;
  margin: 0 0 6px;
  color: var(--acc2);
  text-shadow: 3px 3px 0 #b3410e;
  letter-spacing: 1px;
}
.sub {
  color: var(--mut);
  margin: 0 0 22px;
  font-size: 14px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
  width: min(460px, 100%);
}
label {
  display: block;
  font-size: 13px;
  color: var(--mut);
  margin-bottom: 6px;
}
input {
  background: #12141c;
  border: 1px solid var(--line);
  color: var(--txt);
  border-radius: 9px;
  padding: 11px 12px;
  font-size: 16px;
  font-family: inherit;
  width: 100%;
  outline: none;
}
input:focus {
  border-color: var(--acc);
}
button {
  background: var(--acc);
  color: #1a0d02;
  border: 0;
  border-radius: 9px;
  padding: 12px 14px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
}
button:hover {
  filter: brightness(1.08);
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: none;
}
button.sec {
  background: #2c3048;
  color: var(--txt);
}
button.small {
  padding: 8px 10px;
  font-size: 13px;
}
.row {
  display: flex;
  gap: 8px;
}
.row > * {
  flex: 1;
}
.gap {
  height: 14px;
}
.or {
  color: var(--mut);
  text-align: center;
  font-size: 12px;
  margin: 14px 0;
}
#code {
  text-transform: uppercase;
  letter-spacing: 6px;
  font-weight: 800;
  text-align: center;
}
.hint {
  color: var(--mut);
  font-size: 12.5px;
  line-height: 1.55;
  margin: 18px 0 0;
}
.status {
  font-size: 12.5px;
  color: var(--mut);
  margin-top: 8px;
  min-height: 16px;
}
.status.bad {
  color: #ff8a8a;
}
#game:fullscreen,
#game:-webkit-full-screen {
  background: var(--bg);
  max-width: none;
  width: 100vw;
  height: 100vh;
  padding: 14px;
  align-items: center;
  flex-wrap: nowrap;
  overflow: auto;
}
#game:fullscreen #cvwrap,
#game:-webkit-full-screen #cvwrap {
  flex: 1 1 auto;
  max-width: calc((100vh - 28px) * 760 / 600);
}
#game:fullscreen,
#game:-webkit-full-screen {
  overflow: hidden !important;
}
#game:fullscreen aside,
#game:-webkit-full-screen aside {
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  scrollbar-width: none;
}
#game:fullscreen aside::-webkit-scrollbar,
#game:-webkit-full-screen aside::-webkit-scrollbar {
  display: none;
}
#game {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  max-width: 1120px;
}
#cvwrap {
  flex: 1 1 620px;
  max-width: 800px;
}
canvas {
  transition: none;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  background: #0d0f15;
  box-shadow: 0 10px 40px #0008;
}
aside {
  width: 280px;
  flex: 0 0 280px;
}
aside .panel {
  padding: 18px;
  width: 100%;
}
.codebox {
  font-family: "Press Start 2P", monospace;
  font-size: 24px;
  color: var(--acc2);
  letter-spacing: 4px;
  margin: 4px 0 2px;
}
.small-mut {
  font-size: 12px;
  color: var(--mut);
  line-height: 1.5;
}
.plist {
  list-style: none;
  padding: 0;
  margin: 10px 0 14px;
}
.plist li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex: 0 0 14px;
}
.plist .nm {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plist .sc {
  font-weight: 800;
  color: var(--acc2);
}
.tag {
  font-size: 10px;
  color: var(--mut);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}
.dead .nm {
  opacity: 0.45;
  text-decoration: line-through;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 14px;
  margin: 6px 0 12px;
}
.ctrl {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
[hidden] {
  display: none !important;
}
.mapsel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.mapb {
  background: #12141c;
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 8px 4px;
  color: var(--txt);
  font-size: 11.5px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.mapb .ic {
  font-size: 22px;
}
.mapb.on {
  border-color: var(--acc);
  background: #2a1d14;
}
.pubox {
  margin-top: 10px;
  background: #12141c;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12.5px;
}
.pusel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 10px;
  margin-top: 8px;
}
.pusel label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--txt);
  font-size: 12.5px;
  margin: 0;
  cursor: pointer;
}
.pusel input {
  width: auto;
}
.pusel .all {
  grid-column: 1/-1;
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.plist li.me {
  background: #ffffff0d;
  border-radius: 8px;
}
.plist canvas {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}
.plist li.dead canvas {
  filter: grayscale(1);
  opacity: 0.45;
}
.plist .info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.plist .sub2 {
  font-size: 11.5px;
  color: var(--mut);
}
.plist .crown {
  font-size: 13px;
}
.skins {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-height: 340px;
  overflow: auto;
  padding-right: 2px;
  gap: 8px;
}
.skin {
  background: #12141c;
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 6px 4px 4px;
  cursor: pointer;
  color: var(--txt);
  font-weight: 600;
  font-size: 11.5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.skin canvas {
  width: 64px;
  height: 64px;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
}
.skin.on {
  border-color: var(--acc);
  background: #2a1d14;
}
details.news {
  margin-top: 16px;
  background: #12141c;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--mut);
}
.news ul {
  margin: 8px 0 0;
  padding: 0 0 0 2px;
  list-style: none;
  max-height: 190px;
  overflow: auto;
}
.news li {
  margin: 0 0 7px;
  line-height: 1.45;
}
.news b {
  color: var(--acc2);
  font-weight: 800;
  margin-right: 4px;
}
details summary {
  cursor: pointer;
  color: var(--txt);
  font-weight: 600;
}
.fxrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}
.fxrow input {
  width: auto;
}
#joy {
  position: fixed;
  left: 14px;
  bottom: 14px;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: #ffffff12;
  border: 2px solid #ffffff35;
  touch-action: none;
  z-index: 60;
  backdrop-filter: blur(2px);
}
#knob {
  position: absolute;
  left: 30px;
  top: 30px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff66;
  box-shadow: 0 2px 10px #0006;
  pointer-events: none;
}
#tbtns {
  position: fixed;
  right: 12px;
  bottom: 14px;
  display: grid;
  grid-template-columns: 50px 66px;
  grid-template-rows: 50px 50px;
  gap: 10px;
  z-index: 60;
}
#tbtns button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 21px;
  padding: 0;
  background: #2c3048dd;
  border: 2px solid #ffffff35;
  touch-action: none;
  color: #fff;
}
#tbtns #tbBomb {
  grid-column: 2;
  grid-row: 1/3;
  width: 66px;
  height: 66px;
  align-self: center;
  font-size: 28px;
  background: #ff7b22e6;
}
#tbtns #tbQ {
  grid-column: 1;
  grid-row: 1;
}
#tbtns #tbE {
  grid-column: 1;
  grid-row: 2;
}
body.touchon #game {
  padding-bottom: 180px;
  flex-direction: column;
  align-items: center;
}
body.touchon #cvwrap {
  flex: 0 0 auto;
  width: min(100%, calc((100vh - 12px) * 760 / 600));
  max-width: none;
}
body.touchon aside {
  width: min(100%, 520px);
  flex: 0 0 auto;
}
@media (orientation: landscape) {
  body.touchon #game {
    padding-bottom: 20px;
  }
  body.touchon {
    padding: 4px;
  }
}
canvas {
  touch-action: none;
}
@media (max-width: 900px) {
  body {
    padding: 6px;
  }
  #game {
    gap: 8px;
  }
  aside {
    width: 100%;
    flex: 1 1 100%;
  }
  #cvwrap {
    flex: 1 1 100%;
  }
  .panel {
    padding: 16px;
  }
}
.langsel {
  background: #2c3048;
  color: var(--txt);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 8px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  max-width: 170px;
}
.glist {
  margin-top: 12px;
  background: #12141c;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.glist .gh {
  font-size: 12.5px;
  color: var(--mut);
  font-weight: 700;
  margin-bottom: 6px;
}
.glist .gi {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.glist .gi:first-of-type {
  border-top: 0;
}
.glist .gt {
  flex: 1;
  min-width: 0;
}
.glist .gn {
  font-weight: 800;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.glist .gs {
  font-size: 12px;
  color: var(--mut);
}
.glist button {
  width: auto;
  padding: 8px 14px;
  font-size: 13px;
}
.glist .empty {
  font-size: 12.5px;
  color: var(--mut);
  line-height: 1.5;
}
.pui {
  width: 18px;
  height: 18px;
  vertical-align: -4px;
  display: inline-block;
}
.chat {
  margin-top: 12px;
}
.chatlog {
  max-height: 150px;
  min-height: 44px;
  overflow: auto;
  background: #12141c;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12.5px;
  line-height: 1.45;
  margin-bottom: 6px;
  word-break: break-word;
}
.chat input {
  padding: 8px 10px;
  font-size: 14px;
}
.chat .row button {
  flex: 0 0 48px;
  padding: 8px;
}
.legend {
  margin-top: 12px;
}
.legend summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 13.5px;
  color: var(--txt);
  padding: 6px 0;
  list-style: none;
}
.legend summary::-webkit-details-marker {
  display: none;
}
.legend summary:before {
  content: "▸ ";
  color: var(--acc);
}
.legend[open] summary:before {
  content: "▾ ";
}
.lsec {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mut);
  margin: 10px 0 6px;
}
.lgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}
.li {
  display: flex;
  gap: 9px;
  align-items: center;
  background: #161927;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 5px 8px;
}
.li.map {
  border-color: #ff7b2266;
  background: linear-gradient(90deg, #2a1d14, #161927);
}
.li img {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  background: #0f121c;
  border-radius: 7px;
  padding: 2px;
}
.li .lt {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.li b {
  font-size: 12.5px;
  color: var(--txt);
  line-height: 1.2;
}
.li span {
  font-size: 11.5px;
  color: var(--mut);
  line-height: 1.3;
}
.lmap {
  margin-top: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2c3048, #1e2130);
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.5;
  color: var(--txt);
}
.lmap b {
  color: var(--acc2);
}
kbd {
  background: #2c3048;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11px;
  border-bottom: 2px solid #15172a;
}

/* Start menu screens */
#menu h2 {
  font-size: 20px;
  margin: 6px 0 16px;
}
.player-card {
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 18px 0;
  padding: 12px;
  background: #12141c;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.player-picture {
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  padding: 0;
  background: #1e2130;
  border: 2px solid var(--line);
  border-radius: 12px;
}
.player-picture:hover {
  border-color: var(--acc);
  filter: none;
}
.player-picture img {
  display: block;
  width: 100%;
  height: 100%;
}
.player-fields {
  flex: 1;
  min-width: 0;
}
button.link {
  width: auto;
  padding: 6px 0 0;
  background: none;
  color: var(--acc2);
  font-size: 13px;
  font-weight: 600;
}
button.link:hover {
  text-decoration: underline;
  filter: none;
}
button.menu-back {
  padding: 0 0 10px;
  color: var(--mut);
}
.menu-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.menu-actions button {
  padding: 15px;
  font-size: 17px;
}
.menu-more {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.menu-skins {
  max-height: none;
}
#menu .langsel {
  width: 100%;
  max-width: none;
}
.menu-fx label {
  color: var(--txt);
}
.menu-text {
  margin-top: 0;
  font-size: 14px;
}
.menu-news {
  border: 0;
  padding: 0;
}
.menu-news ul {
  max-height: none;
}
#netStatus:empty {
  display: none;
}
