html, body, #stage {
  margin: 0;
  padding: 0;
  overflow: hidden;
  width: 100%;
  height: 100%;
  background: #0c0a08;
}
html, body {
  height: 100%;
  overscroll-behavior: none;
}
body {
  font-family: "Trebuchet MS", "Comic Sans MS", sans-serif;
  color: #f4e8c8;
  user-select: none;
}
#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, #120e0a 0 2px, #0c0a08 2px 4px);
}
#game {
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  image-rendering: -moz-crisp-edges;
  background: #2d5a27;
  box-shadow: 0 0 0 2px #1a1008, 0 0 0 3px #8a5a28;
  flex: none;
}
#prompt-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  min-width: min(420px, 92vw);
  max-width: 92vw;
  background: #e8d5b0;
  color: #2a1810;
  border: 2px solid #2a1810;
  box-shadow: 0 0 0 1px #c4a060, 2px 2px 0 #1a1008;
  z-index: 5;
}
#status {
  font-size: 11px;
  font-weight: 700;
  min-width: 72px;
  color: #6a3a18;
  letter-spacing: 0.02em;
}
#prompt {
  flex: 1;
  border: 2px solid #5a3a22;
  background: #f4ead0;
  color: #201810;
  font: 700 13px "Trebuchet MS", "Comic Sans MS", sans-serif;
  padding: 4px 8px;
  outline: none;
}
#prompt:disabled {
  color: #8a7460;
  background: #d8c8a8;
}
#prompt:focus {
  border-color: #2a6a32;
}
#card {
  position: fixed;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: #e8d5b0;
  color: #201810;
  border: 2px solid #2a1810;
  box-shadow: 0 0 0 1px #c4a060, 2px 2px 0 #1a1008;
  z-index: 6;
  min-width: 168px;
  max-width: 240px;
  pointer-events: none;
}
#card[hidden] { display: none; }
#card-pfp {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border: 2px solid #2a1810;
  background: #3a2a18;
  flex: none;
}
.card-meta { min-width: 0; }
#card-name {
  font-weight: 800;
  font-size: 14px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#card-title {
  font-size: 11px;
  color: #6a3a18;
}
#card-goal {
  font-size: 11px;
  color: #2a1810;
  margin-top: 2px;
}
#card-role {
  display: inline-block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  padding: 1px 6px;
  border: 1px solid #2a1810;
  background: #c4a060;
}
#card-role[data-role="assistant"] { background: #7cba64; }
#card-role[data-role="user"] { background: #e8c060; }
#card-role[data-role="tool"] { background: #88b4d4; }
