html, body { margin: 0; height: 100%; background: #000; color: #eee; overflow: hidden;
  font-family: Gulim, "굴림", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; }
#stage { position: absolute; inset: 0; margin: auto; aspect-ratio: 4 / 3; max-width: 100vw; max-height: 100vh;
  height: 100%; }
@media (max-aspect-ratio: 4/3) { #stage { height: auto; width: 100%; } }
#stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#hud { pointer-events: none; }
#hint { position: absolute; left: 50%; top: 62%; transform: translateX(-50%); padding: 8px 16px;
  background: rgba(0, 0, 0, .6); border: 1px solid #888; border-radius: 4px; pointer-events: none; }
#loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .78); }
#loading[hidden] { display: none; }
#loading { flex-direction: column; background: #000; }
/* the original's hidden EDIT control: always focused during an online game, drawn by the HUD */
#chatbox { position: absolute; left: 0; bottom: 0; width: 10px; height: 10px; opacity: 0; border: 0; padding: 0; pointer-events: none; }

/* ---- windows of the original lobby client (src/ui/win.js), Windows 2000 look ---- */
#screen { position: fixed; inset: 0; z-index: 5; overflow: auto; background: #000; user-select: none; }
#screen[hidden] { display: none; }
#desk { position: absolute; left: 0; top: 0; width: 800px; height: 600px;
  font: 12px Gulim, "굴림", "Malgun Gothic", sans-serif; color: #000; --face: #d4d0c8; }
#desk [hidden] { display: none !important; }
.win { position: absolute; padding: 3px; background: var(--face); border: 1px solid;
  border-color: var(--face) #000 #000 var(--face); box-shadow: inset 1px 1px #fff, inset -1px -1px #808080; }
.win .cap { display: flex; align-items: center; height: 18px; margin-bottom: 1px; padding: 0 2px 0 3px; color: #fff;
  background: linear-gradient(90deg, #0a246a, #a6caf0); font: bold 12px Gulim, "굴림", "Malgun Gothic", sans-serif; }
.win .cap span { flex: 1; overflow: hidden; white-space: pre; }
.win .cap button { width: 16px; height: 14px; padding: 0 0 1px; font: bold 11px/1 Tahoma, Verdana, sans-serif; color: #000;
  background: var(--face); border: 1px solid; border-color: #fff #404040 #404040 #fff; box-shadow: inset -1px -1px #808080; }
.win .client { position: relative; overflow: hidden; }
.veil { position: absolute; inset: 0; }
.surface { position: absolute; inset: 0; }
.surface img, .sprite { position: absolute; pointer-events: none; }
.sprite { background-repeat: no-repeat; }
.ctl { position: absolute; box-sizing: border-box; margin: 0; padding: 0; }
input.ctl, textarea.ctl, select.ctl, .rich, .list:not(.flat) { border: 2px solid; border-color: #808080 #fff #fff #808080;
  box-shadow: inset 1px 1px #404040, inset -1px -1px var(--face); background: #fff; outline: none; }
input.ctl, textarea.ctl { padding: 1px 3px; font-family: inherit; }
input.ctl.flat { border: 0; box-shadow: none; }
input.ctl[readonly] { cursor: default; }
input.ctl[type=checkbox] { width: 13px !important; height: 13px !important; margin: 2px; border: 0; box-shadow: none; }
textarea.ctl { resize: none; }
select.ctl { padding: 0 1px; border-radius: 0; }
.rich, .list { overflow-x: hidden; overflow-y: auto; }
.rich { padding: 1px 3px; cursor: text; user-select: text; }
.rich div { white-space: pre-wrap; overflow-wrap: anywhere; }
.list .row { position: relative; height: 20px; overflow: hidden; }
.list .row span { position: absolute; white-space: pre; line-height: 12px; }
.list .row img { position: absolute; }
.text { white-space: pre; overflow: hidden; line-height: 1.25; }
.group::before { content: ""; position: absolute; inset: 6px 0 0; border: 1px solid #808080; box-shadow: 1px 1px #fff, inset 1px 1px #fff; }
.group .legend { position: absolute; left: 8px; top: 0; padding: 0 2px; line-height: 13px; background: var(--face); }
.panel { border: 1px solid; border-color: #fff #808080 #808080 #fff; background: var(--face); }
.sbtn { display: flex; align-items: center; justify-content: center; gap: 4px; font: inherit; color: #000; background: var(--face);
  border: 1px solid; border-color: #fff #404040 #404040 #fff; box-shadow: inset -1px -1px #808080; }
.sbtn:active { border-color: #404040 #fff #fff #404040; box-shadow: inset 1px 1px #808080; }
.sbtn.flat { border-color: transparent; box-shadow: none; }
.progress { border: 1px solid; border-color: #808080 #fff #fff #808080; }
.progress .bar { width: 0; height: 100%; background: #0a246a; }
.mb-text { position: absolute; left: 22px; top: 18px; white-space: pre; line-height: 15px; }
.mb-btns { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.mb-btns button, .opt select { font: 12px Gulim, "굴림", "Malgun Gothic", sans-serif; }
.mb-btns button { width: 75px; height: 23px; color: #000; background: var(--face); border: 1px solid;
  border-color: #fff #404040 #404040 #fff; box-shadow: inset -1px -1px #808080; }
.mb-btns button:focus { outline: 1px dotted #000; outline-offset: -5px; }
.menu { position: absolute; padding: 2px; background: var(--face); border: 1px solid;
  border-color: var(--face) #000 #000 var(--face); box-shadow: inset 1px 1px #fff, inset -1px -1px #808080; }
.menu .item { padding: 3px 22px; white-space: nowrap; }
.menu .item:hover { color: #fff; background: #0a246a; }
.opt { position: absolute; left: 14px; top: 14px; display: grid; grid-template-columns: 62px 146px; gap: 7px 8px; align-items: center; }
.opt label { white-space: pre; }
.opt select { height: 21px; border: 2px solid; border-color: #808080 #fff #fff #808080; background: #fff; }
.opt-btns { position: absolute; right: 12px; bottom: 8px; display: flex; gap: 2px; }
.opt-btns .sbtn { width: 86px; height: 28px; }
