html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #05070a;
  color: var(--nl-bone, #e1e1de);
  font-family: 'Barlow', system-ui, sans-serif;
}

#root {
  position: fixed;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

#ns-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

#ns-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.ns-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 42%, rgba(0, 0, 0, .62) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .45) 0%, transparent 22%);
}

.ns-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .05;
  background-size: 180px 180px;
}

#main-hud {
  display: flex;
  flex-flow: row wrap;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  padding-top: 20px;
  overflow: visible;
}

.hud-top-elements {
  position: static;
  top: auto;
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.hud-top-section { width: auto; align-items: stretch; }

.hud-info-group { margin-bottom: 0; align-items: center; }

#hud-scoreboard-container { opacity: 1 !important; }

#status-hud-container {
  position: static;
  width: auto;
  height: auto;
  display: flex;
  align-items: stretch;
}

#status-icons {
  position: static;
  flex-direction: row;
  align-items: stretch;
  gap: 6px;
}

#status-icons .status-icon:not(.visible) { display: none; }

.status-icon { width: 44px; height: auto; min-height: 44px; }

.status-icon .material-icons-outlined { font-size: 22px; }

#border { display: none !important; }

#ns-dock {
  position: fixed;
  left: 16px;
  top: 16px;
  bottom: 16px;
  width: 322px;
  max-width: 30vw;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(14, 14, 15, .93) 0%, rgba(10, 10, 12, .95) 100%);
  border: 1px solid rgba(225, 225, 222, .14);
  border-radius: 2px;
  box-shadow: 0 30px 80px -34px rgba(0, 0, 0, .95);
  backdrop-filter: blur(9px);
  transition: transform .34s cubic-bezier(.76, 0, .24, 1), opacity .34s ease;
}

#ns-dock.collapsed {
  transform: translateX(calc(-100% - 18px));
  opacity: 0;
}

.dock-head {
  padding: 13px 14px 11px;
  border-bottom: 1px solid rgba(225, 225, 222, .12);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.dock-head h1 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #e1e1de;
}

.dock-head p {
  margin: 4px 0 0;
  font-size: 10.5px;
  line-height: 1.45;
  letter-spacing: .05em;
  color: rgba(225, 225, 222, .45);
}

.dock-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 14px 16px;

  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 26px), transparent 100%);
}

.dock-body::-webkit-scrollbar { width: 6px; }
.dock-body::-webkit-scrollbar-thumb { background: rgba(225, 225, 222, .16); }
.dock-body::-webkit-scrollbar-track { background: transparent; }

.dock-sec { padding: 12px 0 4px; border-top: 1px solid rgba(225, 225, 222, .08); }
.dock-sec:first-child { border-top: 0; }

.dock-sec > h2 {
  margin: 0 0 9px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(225, 225, 222, .38);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.dock-sec > h2 em {
  font-style: normal;
  letter-spacing: .08em;
  color: rgba(225, 225, 222, .28);
  font-size: 9px;
}

.row { display: flex; flex-wrap: wrap; gap: 5px; }
.row + .row { margin-top: 5px; }

.btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 7px 9px;
  font: inherit;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(225, 225, 222, .78);
  background: rgba(225, 225, 222, .035);
  border: 1px solid rgba(225, 225, 222, .12);
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  transition: background .16s cubic-bezier(.76, 0, .24, 1), color .16s, border-color .16s;
}

.btn:hover { background: rgba(225, 225, 222, .085); color: #e1e1de; }
.btn:focus-visible { outline: 1px solid var(--nl-warning, #cdbb8e); outline-offset: 1px; }

.btn.on {
  background: rgba(205, 187, 142, .16);
  border-color: rgba(205, 187, 142, .55);
  color: #cdbb8e;
}

.btn.wide { flex-basis: 100%; }

.field { margin: 8px 0 2px; }

.field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(225, 225, 222, .5);
  margin-bottom: 5px;
}

.field label b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  color: #cdbb8e;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: rgba(225, 225, 222, .16);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #cdbb8e;
  border: 2px solid #0e0e0f;
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #cdbb8e;
  border: 2px solid #0e0e0f;
  cursor: pointer;
}

.hint {
  margin: 9px 0 0;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .04em;
  color: rgba(225, 225, 222, .34);
}

.hint kbd {
  font: inherit;
  font-size: 9.5px;
  padding: 1px 5px;
  border: 1px solid rgba(225, 225, 222, .2);
  border-radius: 2px;
  color: rgba(225, 225, 222, .6);
}

.dock-foot {
  padding: 9px 14px 11px;
  border-top: 1px solid rgba(225, 225, 222, .12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(225, 225, 222, .3);
}

.dock-foot a { color: rgba(205, 187, 142, .8); text-decoration: none; border-bottom: 1px solid rgba(205, 187, 142, .3); }
.dock-foot a:hover { color: #cdbb8e; }

#ns-dock-tab {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 21;
  writing-mode: vertical-rl;
  padding: 16px 7px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(225, 225, 222, .55);
  background: rgba(14, 14, 15, .9);
  border: 1px solid rgba(225, 225, 222, .14);
  border-left: 0;
  border-radius: 0 2px 2px 0;
  cursor: pointer;
  transition: color .16s, background .16s;
}

#ns-dock-tab:hover { color: #cdbb8e; background: rgba(20, 20, 22, .95); }

#ns-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  z-index: 30;
  padding: 8px 16px;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(225, 225, 222, .85);
  background: rgba(14, 14, 15, .94);
  border: 1px solid rgba(225, 225, 222, .16);
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .26s ease, transform .26s cubic-bezier(.76, 0, .24, 1);
  white-space: nowrap;
  max-width: 76vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

#ns-toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-height: 860px) {
  #ns-dock { width: 292px; bottom: 10px; top: 10px; left: 10px; }
  .dock-body { padding: 2px 12px 12px; }
  .dock-sec { padding: 10px 0 2px; }
}

@media (max-width: 1180px) {
  #ns-dock { width: 268px; }
  .status-icon { width: 38px; min-height: 38px; }
  .status-icon .material-icons-outlined { font-size: 19px; }
}
