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

html, body {
  height: 100%;
  overflow: hidden;
  background: #05070f;
  color: #dfe6ff;
  font-family: "Courier New", ui-monospace, monospace;
}

#cv { position: fixed; inset: 0; display: block; touch-action: none; }
body { overscroll-behavior: none; }

/* ---------- touch controls ---------- */
#stick, #btn-use { display: none; }
#stick {
  position: fixed; width: 120px; height: 120px; z-index: 7;
  border-radius: 50%; border: 2px solid #26335c;
  background: rgba(10,15,31,0.4); pointer-events: none;
}
#nub {
  position: absolute; left: 32px; top: 32px; width: 52px; height: 52px;
  border-radius: 50%; background: rgba(85,98,143,0.8); border: 2px solid #7c8ec4;
}
body.touch #btn-use {
  display: flex; position: fixed; right: 20px; bottom: 26px; z-index: 7;
  width: 76px; height: 76px; border-radius: 50%;
  border: 2px solid #26335c; background: rgba(10,15,31,0.75);
  color: #5cc8ff; font-size: 26px; align-items: center; justify-content: center;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
body.touch #btn-use.armed { border-color: #5cc8ff; box-shadow: 0 0 14px #5cc8ff44; }
@media (max-width: 700px) {
  #hud { font-size: 12px; }
  #hud-roster { font-size: 11px; }
  #banner { font-size: 28px; letter-spacing: 5px; }
  .panel h1 { font-size: 36px; letter-spacing: 8px; }
}

.hidden { display: none !important; }

/* ---------- lobby ---------- */
#lobby {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 30%, #101a33 0%, #05070f 70%);
  z-index: 10;
}
.panel {
  width: min(560px, 92vw);
  max-height: 94vh; overflow-y: auto;
  padding: 28px 34px;
  background: #0a0f1f;
  border: 1px solid #26335c;
  box-shadow: 0 0 60px #000a, inset 0 0 40px #0d142a;
}
.panel h1 {
  font-size: 52px; letter-spacing: 14px; text-align: center;
  color: #ffd23f; text-shadow: 0 0 24px #ffd23f55;
}
.panel .sub { text-align: center; letter-spacing: 4px; color: #7c8ec4; margin-bottom: 16px; }
.panel .blurb { font-size: 13px; line-height: 1.5; color: #a8b4dd; margin-bottom: 18px; }
.panel label {
  display: block; font-size: 12px; letter-spacing: 2px;
  color: #7c8ec4; margin: 14px 0 4px;
}
.panel .hint { color: #55628f; letter-spacing: 0; text-transform: none; }
.panel input {
  width: 100%; padding: 9px 12px; font: inherit; font-size: 15px;
  background: #060a16; color: #ffd23f;
  border: 1px solid #26335c; outline: none;
}
.panel input:focus { border-color: #ffd23f; }

#classes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cls {
  padding: 10px 12px; cursor: pointer;
  border: 1px solid #26335c; background: #060a16;
}
.cls:hover { border-color: #55628f; }
.cls.sel { border-color: #ffd23f; background: #141a30; }
.cls b { display: block; font-size: 13px; letter-spacing: 1px; }
.cls span { font-size: 11px; color: #a8b4dd; }

#play {
  width: 100%; margin-top: 20px; padding: 13px;
  font: inherit; font-size: 17px; font-weight: bold; letter-spacing: 4px;
  background: #ffd23f; color: #14100a; border: 0; cursor: pointer;
}
#play:hover { background: #ffe07a; }
.help { margin-top: 16px; font-size: 11px; line-height: 1.6; color: #55628f; }
.records {
  font-size: 11px; line-height: 1.7; color: #a8b4dd;
  max-height: 120px; overflow-y: auto;
  padding: 8px 10px; background: #060a16; border: 1px solid #26335c;
}
.records b { color: #ffd23f; }
#hud-item { color: #5cc8ff; }

/* ---------- HUD ---------- */
#hud {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 10px 14px; pointer-events: none; z-index: 5;
  font-size: 15px; text-shadow: 0 1px 3px #000;
}
#hud-left span { margin-right: 18px; }
#hud-job { color: #7c8ec4; letter-spacing: 1px; }
#hud-coins { color: #ffd23f; }
#hud-alarm { color: #ff5c5c; letter-spacing: 2px; }
#hud-roster { text-align: right; font-size: 13px; line-height: 1.5; }

/* ---------- banner & toast ---------- */
#banner {
  position: fixed; top: 34%; left: 0; right: 0;
  text-align: center; z-index: 6; pointer-events: none;
  font-size: 44px; font-weight: bold; letter-spacing: 10px;
  color: #ffd23f; text-shadow: 0 0 30px #000, 0 0 60px #ffd23f44;
}
#banner .small { display: block; font-size: 15px; letter-spacing: 3px; color: #a8b4dd; margin-top: 10px; }

#toast {
  position: fixed; bottom: 26px; left: 0; right: 0;
  text-align: center; z-index: 6; pointer-events: none;
  font-size: 14px; letter-spacing: 1px; color: #dfe6ff;
  text-shadow: 0 1px 3px #000; opacity: 0; transition: opacity .4s;
}
#toast.show { opacity: 1; }
