:root {
  color-scheme: dark;
  --bg: #000000;
  --panel: #111111;
  --frame: #c0c0c0;
  --text: #ffffff;
  --muted: #ffcc00;
  --glow: rgba(255, 204, 0, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 0, 0, 0.14), transparent 18%),
    linear-gradient(180deg, #000000 0%, #130000 46%, #000000 100%);
  color: var(--text);
  font-family: "JetBrains Mono", "SFMono-Regular", "Menlo", monospace;
}

body {
  display: flex;
  justify-content: center;
  padding: 28px;
}

.app-shell {
  width: min(1180px, 100%);
}

.title-block {
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #ffcc00;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
}

.subtitle {
  margin: 10px 0 0;
  max-width: 760px;
  color: #c0c0c0;
  font-size: 14px;
  line-height: 1.6;
}

.canvas-frame {
  position: relative;
  overflow: auto;
  border: 3px outset #c0c0c0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(20, 20, 20, 0.96), rgba(0, 0, 0, 0.98)),
    var(--panel);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 0 12px var(--glow);
  padding: 18px;
}

.canvas-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(130deg, transparent 0 33%, rgba(255, 255, 255, 0.025) 33% 36%, transparent 36% 100%),
    linear-gradient(35deg, transparent 0 62%, rgba(255, 255, 255, 0.018) 62% 65%, transparent 65% 100%);
  opacity: 0.65;
}

canvas {
  display: block;
  width: min(1100px, 100%);
  height: auto;
  border-radius: 0;
  border: 2px inset #c0c0c0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #000000;
}

.skill-panel {
  margin-top: 18px;
  border: 3px outset #c0c0c0;
  background: #111;
  padding: 16px;
}

.architect-panel {
  margin-top: 18px;
  border: 3px outset #c0c0c0;
  background: #080808;
  padding: 16px;
}

.room-panel {
  margin-top: 18px;
  border: 3px outset #c0c0c0;
  background: #090909;
  padding: 16px;
}

.transcript-panel {
  margin-top: 18px;
  border: 3px outset #c0c0c0;
  background: #050505;
  padding: 16px;
}

.skill-kicker {
  margin: 0 0 8px;
  color: #00ff00;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.skill-panel h2 {
  margin: 0;
  font-size: 22px;
}

.skill-note {
  margin: 8px 0 0;
  color: #c0c0c0;
  font-size: 13px;
  line-height: 1.5;
}

.skill-form {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.architect-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.skill-form input,
.skill-form select,
.skill-form button,
.architect-form input,
.architect-form select,
.architect-form button {
  border: 2px inset #c0c0c0;
  background: #000;
  color: #fff;
  font: inherit;
  padding: 10px 12px;
}

.skill-form button,
.architect-form button {
  border: 2px outset #c0c0c0;
  background: #8b0000;
  cursor: pointer;
}

#agentName,
#agentRole,
#agentCustomRole,
#agentJob,
#agentHairColor,
#agentSkinColor,
#agentShirtColor,
#agentPantsColor,
#agentAccessory,
#agentShoes {
  min-width: 180px;
}

#agentPersonality,
#agentSkills {
  min-width: 260px;
}

.architect-registry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.skill-status {
  margin-top: 12px;
  color: #ffcc00;
  font-size: 12px;
}

.skill-registry {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.registry-card {
  border: 2px outset #c0c0c0;
  background: #000;
  padding: 10px;
}

.architect-card {
  border: 2px outset #c0c0c0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    #000;
  padding: 10px;
}

.registry-name {
  margin: 0 0 6px;
  color: #fff;
  font-size: 13px;
}

.registry-meta {
  margin: 0;
  color: #00ff00;
  font-size: 11px;
}

.registry-detail {
  margin: 6px 0 0;
  color: #c0c0c0;
  font-size: 11px;
  line-height: 1.45;
}

.room-inspector {
  margin-top: 14px;
  border: 2px inset #c0c0c0;
  background: #000;
  padding: 14px;
  min-height: 150px;
}

.room-name {
  margin: 0 0 8px;
  color: #ffcc00;
  font-size: 15px;
}

.room-copy {
  margin: 0 0 8px;
  color: #c0c0c0;
  font-size: 12px;
  line-height: 1.5;
}

.chat-transcript {
  margin-top: 14px;
  border: 2px inset #c0c0c0;
  background: #000;
  min-height: 180px;
  max-height: 280px;
  overflow: auto;
  padding: 12px;
}

.transcript-line {
  margin: 0 0 8px;
  color: #c0c0c0;
  font-size: 12px;
  line-height: 1.45;
}

.transcript-line strong {
  color: #00ff00;
}

@media (max-width: 1200px) {
  body {
    padding: 16px;
  }

  .canvas-frame {
    padding: 12px;
    border-radius: 0;
  }

  .skill-form {
    flex-direction: column;
  }
}
