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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0f380f;
  font-family: monospace;
}

#container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-bottom: 72px;
}

#stage {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

#canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  /* Integer nearest-neighbor upscale toward viewport */
  width: min(100vw, calc((100vh - 72px) * 480 / 270));
  height: auto;
  max-height: calc(100vh - 72px);
  background: #9bbc0f;
  cursor: crosshair;
}

.card {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 280px;
  background: rgba(15, 56, 15, 0.95);
  border: 3px solid #8bac0f;
  border-radius: 8px;
  padding: 12px;
  color: #9bbc0f;
  font-size: 12px;
  z-index: 100;
}

.card.hidden {
  display: none;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.card-pfp {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #8bac0f;
}

.card-name {
  font-weight: bold;
  font-size: 14px;
  color: #9bbc0f;
}

.card-title {
  font-size: 11px;
  color: #8bac0f;
}

.card-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #9bbc0f;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.card-close:hover {
  color: #fff;
}

.card-status {
  padding: 8px;
  background: rgba(48, 98, 48, 0.5);
  border-radius: 4px;
  font-size: 11px;
}

.prompt-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, 600px);
  z-index: 99;
}

.prompt-bar input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(15, 56, 15, 0.95);
  border: 3px solid #8bac0f;
  border-radius: 8px;
  color: #9bbc0f;
  font-family: monospace;
  font-size: 14px;
  outline: none;
}

.prompt-bar input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.prompt-bar input:focus:not(:disabled) {
  border-color: #9bbc0f;
}

.prompt-bar input::placeholder {
  color: #8bac0f;
}
