/* Monochrome console panels, matching html/neolobby.css. */
:root {
  color-scheme: dark;
  font: 12px/1.5 Verdana, Geneva, sans-serif;
  color: #ddd;
  background: #050505;
  --panel: #090909;
  --surface: #141414;
  --hover: #262626;
  --line: #303030;
  --line-strong: #626262;
  --muted: #999;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}
header, footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 6px 12px;
  background: linear-gradient(#141414, #090909);
  flex-shrink: 0;
}
header { border-bottom: 1px solid var(--line); }
footer {
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.brand {
  color: #eee;
  font: 700 15px/1 Corbel, Verdana, sans-serif;
  letter-spacing: 0.35em;
  text-decoration: none;
}
nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
a { color: #ddd; text-underline-offset: 4px; }
button, nav a, .dialog-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  font: inherit;
  letter-spacing: 0.02em;
  color: #ccc;
  background: linear-gradient(#202020, #111);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: inset 0 1px 0 #ffffff09;
  padding: 6px 10px;
  cursor: pointer;
  text-decoration: none;
}
button:hover, nav a:hover, .dialog-action:hover {
  background: var(--hover);
  border-color: var(--line-strong);
  color: #fff;
}
button:active, nav a:active, .dialog-action:active { background: #303030; }
:focus-visible { outline: 1px solid #eee; outline-offset: 2px; }
button:disabled { cursor: wait; opacity: 0.5; }
nav button, nav a { font-size: 11px; }
nav svg { flex-shrink: 0; }
#account { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
#byond-link.link-pending {
  color: #fff;
  border-color: #737373;
  box-shadow: inset 0 -2px 0 #ddd;
}
main {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #050505;
}
iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #050505;
}
main:fullscreen { width: 100%; height: 100%; }
#notice {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #050505;
  height: 100%;
  overflow: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px;
  text-align: center;
}
h1 { margin: 8px 0; font-size: 16px; font-weight: 400; }
#connection-status { color: #ddd; }
#load-progress {
  width: min(420px, 90%);
  height: 4px;
  margin-top: 16px;
  border: 0;
  background: #202020;
  accent-color: #ccc;
}
#load-progress::-webkit-progress-bar { background: #202020; }
#load-progress::-webkit-progress-value { background: #ccc; }
#load-progress::-moz-progress-bar { background: #ccc; }
#auth-dialog, #byond-dialog {
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 1px solid var(--line);
  border-top-color: var(--line-strong);
  border-radius: 0;
  padding: 28px 22px 22px;
  background: linear-gradient(#151515, #090909 100px);
  color: #ddd;
  box-shadow: 0 16px 64px #000b;
}
#byond-dialog { width: min(440px, calc(100vw - 32px)); }
#auth-dialog::backdrop, #byond-dialog::backdrop { background: #000b; }
#byond-dialog h2 {
  margin: 0 24px 24px 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font: 700 21px/1.2 Corbel, Verdana, sans-serif;
  color: #eee;
  letter-spacing: 0.02em;
}
#byond-dialog p { line-height: 1.6; }
#byond-dialog .muted { color: var(--muted); font-size: 11px; }
#auth-dialog input, #byond-server, #byond-proof, #auth-has-byond {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #080808;
  color: #eee;
  font: inherit;
}
#auth-dialog input { display: block; margin: 12px 0; }
input::placeholder { color: #888; opacity: 1; }
input:focus, select:focus { border-color: var(--line-strong); }
.auth-tabs { display: flex; gap: 5px; margin-bottom: 18px; }
.auth-tabs [aria-pressed="true"] {
  color: #fff;
  border-color: var(--line-strong);
  background: #292929;
  box-shadow: inset 0 -2px 0 #ddd;
}
#auth-current { display: block; margin-bottom: 16px; color: #eee; }
#auth-recovery code {
  display: block;
  overflow-wrap: anywhere;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: #111;
  color: #eee;
}
#auth-error, #byond-error {
  color: #eee;
  margin: 14px 0 0;
  padding-left: 10px;
  border-left: 2px solid #999;
  font-size: 11px;
}
#auth-error:empty, #byond-error:empty { display: none; }
#auth-byond-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  color: #aaa;
}
#auth-has-byond { width: auto; padding: 6px 12px; }
#auth-close, #byond-close.dialog-close {
  position: absolute;
  right: 7px;
  top: 5px;
  min-height: 24px;
  padding: 0 7px;
  border: 0;
  box-shadow: none;
  background: transparent;
  color: #aaa;
  font: 20px/24px Arial, sans-serif;
}
#auth-close:hover, #byond-close.dialog-close:hover { color: #fff; }
.link-code { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
#byond-code {
  min-width: 0;
  overflow-wrap: anywhere;
  user-select: all;
  font-size: 15px;
  letter-spacing: 1px;
}
#byond-proof { margin-bottom: 12px; }
body.game-fullscreen > header { display: none; }
@media (max-width: 700px) {
  header, footer { padding: 6px 8px; gap: 6px; }
  nav { gap: 4px; }
  nav button, nav a { padding: 5px 7px; }
  .brand { font-size: 12px; letter-spacing: 0.2em; }
}

#voice-toggle[data-state="on"] { color: #a6c7ad; }
#voice-toggle[data-state="connecting"] { opacity: 0.5; }
#voice-toggle.voice-transmitting { border-color: #81d19a; }
#voice-toggle.voice-speaking {
  color: #caffd6;
  background: #21432a;
  box-shadow: 0 0 6px #81d19a44;
}
#voice-settings {
  position: absolute;
  right: 12px;
  top: 44px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
}
#voice-settings label { display: flex; align-items: center; }
#voice-volume { width: 90px; accent-color: #81d19a; }
#voice-settings select { max-width: 170px; }
#voice-speakers {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #a6c7ad;
  font-size: 11px;
}
#voice-toggle { position: relative; }
#voice-toggle[data-state="on"]::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: var(--voice-level, 0%);
  background: #81d19a;
}
#voice-threshold { width: 70px; accent-color: #81d19a; }
#voice-settings { flex-wrap: wrap; max-width: calc(100vw - 24px); }
