* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  background: #1a1510;
  color: #e8dcc8;
  font-family: "Segoe UI", system-ui, sans-serif;
  overflow: hidden;
}
#stage {
  position: relative;
  width: 100vw;
  height: calc(100vh - 72px);
  background: #0d1a12;
  display: flex;
  align-items: center;
  justify-content: center;
}
#game {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: crosshair;
  background: #2a3a28;
}
#hud {
  position: absolute;
  top: 8px;
  left: 10px;
  pointer-events: none;
  text-shadow: 0 1px 2px #000;
  font-size: 13px;
}
#title { font-weight: 700; letter-spacing: 0.04em; color: #f0d78c; }
#status { opacity: 0.75; font-size: 11px; }
#card {
  position: absolute;
  right: 12px;
  top: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(20, 16, 10, 0.92);
  border: 1px solid #8a6a3a;
  border-radius: 6px;
  padding: 10px 12px;
  max-width: 280px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.45);
}
#card.hidden { display: none; }
#card-avatar {
  width: 48px; height: 48px;
  image-rendering: pixelated;
  border: 1px solid #6a5430;
  background: #2a3a28;
  border-radius: 4px;
  object-fit: cover;
}
#card-name { font-weight: 700; color: #f0d78c; font-size: 14px; }
#card-title { font-size: 11px; opacity: 0.85; margin-top: 2px; }
#card-state { font-size: 11px; margin-top: 6px; color: #a8d4a0; }
#card-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: #c0a878;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}
#prompt-bar {
  height: 72px;
  padding: 8px 14px 10px;
  background: #14100c;
  border-top: 1px solid #3a3020;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#prompt-bar label { font-size: 11px; color: #a09070; }
#prompt-bar .row { display: flex; gap: 8px; align-items: center; }
#selected-label {
  min-width: 120px;
  font-size: 12px;
  color: #f0d78c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#prompt-input {
  flex: 1;
  background: #1e1810;
  border: 1px solid #5a4a30;
  color: #e8dcc8;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 14px;
}
#prompt-input:focus { outline: 1px solid #c0a050; }
#prompt-send {
  background: #6a4a20;
  color: #f5e6c8;
  border: 1px solid #a08040;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}
#prompt-send:disabled, #prompt-input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
#prompt-send:not(:disabled):hover { background: #805828; }
