:root {
  --bg: #07081a; --frame: #1b1f6b; --screen: #000; --ink: #e8ecff; --dim: #8f97d6;
  --cyan: #4fb3ff; --yellow: #ffd23f; --pink: #ff6bd6; --green: #5de05d;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: "DotGothic16", ui-monospace, monospace; min-height: 100vh; display: flex; justify-content: center; align-items: flex-start; padding: 16px; }

#monitor { width: 100%; max-width: 780px; background: var(--frame); border-radius: 14px; padding: 12px;
  box-shadow: 0 0 0 3px #2f4bd6, 0 12px 40px rgba(0,0,0,.6); }
#bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.logo { font-size: 13px; letter-spacing: .12em; color: var(--cyan); }
.logo b { color: var(--yellow); font-weight: normal; }
.tools { display: flex; gap: 6px; flex-wrap: wrap; }
.tools button, #cmdline button, #howto button {
  font: inherit; font-size: 13px; color: var(--ink); background: #000; border: 2px solid var(--cyan); border-radius: 4px; padding: 4px 10px; cursor: pointer; }
.tools button:hover, #cmdline button:hover { background: #10133f; }
#howto-btn { border-color: var(--pink); }

#pic { display: block; width: 100%; aspect-ratio: 256 / 160; image-rendering: pixelated; image-rendering: crisp-edges;
  background: #000; border: 3px solid #000; border-radius: 4px; cursor: pointer; }

#out { height: 190px; overflow-y: auto; background: var(--screen); margin-top: 8px; padding: 10px 12px; border-radius: 4px;
  font-size: 16px; line-height: 1.55; border: 3px solid #000; }
#out p { margin: 0 0 2px; }
#out .room { color: var(--yellow); margin-top: 6px; }
#out .cmd { color: var(--green); margin-top: 6px; }
#out .help { color: var(--cyan); }
#out .doc { color: #2a2418; background: #f3ecd8; padding: 2px 8px; margin: 0; font-family: Georgia, "Times New Roman", serif; }
#out .doc:first-of-type { }

#cmdline { display: flex; align-items: center; gap: 8px; margin-top: 8px; background: #000; border-radius: 4px; padding: 6px 10px; border: 3px solid #000; }
#cmdline label { color: var(--green); font-size: 18px; }
#cmd { flex: 1; min-width: 0; font: inherit; font-size: 18px; color: var(--green); background: transparent; border: none; outline: none;
  text-transform: uppercase; caret-color: var(--green); }
#cmd::placeholder { color: #2c5e2c; }

#howto { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; padding: 16px; }
#howto[hidden] { display: none; }
#howto .panel { max-width: 560px; background: #000; border: 3px solid var(--pink); border-radius: 8px; padding: 18px 20px;
  font-family: "DotGothic16", "Noto Sans JP", sans-serif; line-height: 1.7; font-size: 15px; }
#howto h2 { margin: 0 0 8px; color: var(--pink); font-weight: normal; }
#howto code { color: var(--green); font-family: inherit; }
#howto b { color: var(--yellow); font-weight: normal; }

@media (max-width: 520px) {
  body { padding: 8px; }
  #out { height: 170px; font-size: 15px; }
}
