@font-face {
  font-family: "IBM VGA";
  src: url("/fonts/WebPlus_IBM_VGA_8x16.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

:root {
  --black: #000000;
  --blue: #0000AA;
  --green: #00AA00;
  --cyan: #00AAAA;
  --red: #AA0000;
  --purple: #AA00AA;
  --brown: #AA5500;
  --ltgray: #AAAAAA;
  --dkgray: #555555;
  --ltblue: #5555FF;
  --ltgreen: #55FF55;
  --ltcyan: #55FFFF;
  --ltred: #FF5555;
  --ltpurple: #FF55FF;
  --yellow: #FFFF55;
  --white: #FFFFFF;
  --font: "IBM VGA", ui-monospace, "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--blue);
  color: var(--yellow);
  font-family: var(--font);
  font-size: 16px;
  line-height: 16px;
  letter-spacing: 0;
  font-kerning: none;
  font-variant-ligatures: none;
  font-smooth: never;
  -webkit-font-smoothing: none;
}

::selection { background: var(--yellow); color: var(--blue); }

a { color: var(--cyan); text-decoration: none; }
a:hover, a:focus-visible { color: var(--white); }

.desk { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.star { position: absolute; color: var(--white); font-size: 16px; line-height: 16px; }

.icon {
  position: absolute;
  z-index: 2;
  top: 3.5rem;
  right: 1.25rem;
  width: 7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font: inherit;
  color: var(--white);
  background: transparent;
  border: 0;
  cursor: pointer;
  line-height: 16px;
}
.icon[hidden] { display: none; }
.icon-face {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: var(--yellow);
  border: 2px solid var(--white);
  outline: 2px solid var(--black);
}
.icon:focus-visible { outline: 2px solid var(--yellow); }

.menu {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  background: var(--ltgray);
  color: var(--black);
  border-bottom: 2px solid var(--white);
  box-shadow: 0 2px 0 var(--black);
}

.menu-item {
  font: inherit;
  color: var(--black);
  background: transparent;
  border: 0;
  padding: 4px 14px;
  cursor: default;
}

a.menu-item { cursor: pointer; }
a.menu-item:hover, a.menu-item:focus-visible {
  background: var(--blue);
  color: var(--white);
}

.stage {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding: 1.5rem 1rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.25rem 1.5rem;
}

.win {
  background: var(--blue);
  color: var(--yellow);
  border: 2px solid var(--white);
  outline: 2px solid var(--black);
  max-width: 42rem;
}

.win--gospel { position: relative; z-index: 1; flex: 1 1 28rem; }
.win--signup {
  position: relative;
  z-index: 2;
  flex: 0 1 24rem;
  max-width: 26rem;
  margin-top: 2.5rem;
}
.win--signup[hidden] { display: none; }

.title {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--yellow);
  color: var(--black);
  padding: 2px 6px;
  overflow: hidden;
  min-height: 20px;
  line-height: 16px;
}

.close {
  width: 14px;
  height: 14px;
  flex: none;
  background: var(--red);
  border: 2px solid var(--black);
  padding: 0;
  cursor: default;
}
button.close { cursor: pointer; }
button.close:hover, button.close:focus-visible {
  background: var(--ltred);
}

.title-text {
  flex: none;
  font-weight: 400;
  background: var(--yellow);
  padding-right: 8px;
}

.marquee-wrap {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

.marquee {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 18s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.body { padding: 12px 14px 16px; color: var(--white); line-height: 16px; }
.body p { margin: 0 0 8px; line-height: 16px; }
.body .gap { margin-top: 16px; }

.tag { color: var(--ltgray); }
.yellow { color: var(--yellow); }
.cyan { color: var(--cyan); }
.prompt { color: var(--ltgreen); }

.cur {
  display: inline-block;
  color: var(--yellow);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.form { margin-top: 0.6rem; }

.row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--yellow);
  margin-bottom: 10px;
}

.row input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  font: inherit;
  font-size: 16px;
  color: var(--yellow);
  background: var(--black);
  border: 2px solid var(--ltgray);
  padding: 6px 8px;
  border-radius: 0;
  caret-color: var(--yellow);
}

.row input:focus { outline: 2px solid var(--yellow); outline-offset: 0; }

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.btn {
  display: inline-block;
  min-height: 44px;
  padding: 8px 16px;
  font: inherit;
  color: var(--black);
  background: var(--ltgray);
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--dkgray);
  border-right: 2px solid var(--dkgray);
  cursor: pointer;
}

.btn:hover, .btn:focus-visible { background: var(--white); }
.btn:active {
  border-top-color: var(--dkgray);
  border-left-color: var(--dkgray);
  border-bottom-color: var(--white);
  border-right-color: var(--white);
}
.btn:disabled { opacity: 0.7; cursor: default; }

.status {
  min-height: 1.25em;
  margin-top: 10px;
  color: var(--yellow);
}
.status.is-ok { color: var(--ltgreen); }
.status.is-dup { color: var(--yellow); }
.status.is-err { color: var(--ltred); }

.host {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.host-chant {
  flex: none;
  overflow: hidden;
  white-space: nowrap;
  color: var(--yellow);
  background: var(--black);
  padding: 4px 0;
}
.host canvas {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 180px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.bar {
  position: relative;
  z-index: 3;
  flex: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 4px 10px;
  background: var(--ltgray);
  color: var(--black);
  border-top: 2px solid var(--white);
}
.bar a { color: var(--blue); }
.bar a:hover { color: var(--red); }

@media (max-width: 720px) {
  .win--signup { margin-top: 0; max-width: none; flex-basis: 100%; }
  .win { max-width: none; }
  .icon { top: auto; bottom: 3.5rem; right: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee, .host-chant { animation: none; }
  .cur { animation: none; }
}
