:root {
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b1410;
  color: #edf7ef;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top, #193626, #0b1410 55%); }

.layout {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
}

.panel {
  background: rgba(11, 25, 17, 0.88);
  border: 1px solid rgba(151, 255, 184, 0.2);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.eyebrow { color: #9be7ae; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; }
h1 { margin: 4px 0 8px; font-size: 44px; }
.subtitle { color: #bdd8c2; line-height: 1.5; }
label { display: block; margin-top: 24px; margin-bottom: 8px; font-weight: 700; }
.join-row { display: flex; gap: 8px; }
input {
  min-width: 0;
  flex: 1;
  border: 1px solid #356448;
  border-radius: 10px;
  padding: 11px 12px;
  background: #07110b;
  color: white;
  font: inherit;
}
button {
  border: 0;
  border-radius: 10px;
  padding: 11px 14px;
  background: #39b968;
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
button:disabled { opacity: .45; cursor: not-allowed; }
.status { min-height: 24px; color: #c9f5d2; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0; }
.stats div { background: #12291a; border-radius: 12px; padding: 10px; }
.stats span { display: block; color: #9fc7a8; font-size: 12px; }
.stats strong { display: block; margin-top: 4px; font-size: 18px; }
.attack { width: 100%; background: #d99022; }
.hint { color: #bdd8c2; line-height: 1.5; font-size: 14px; }
.dpad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 24px; }
.dpad button { background: #234534; font-size: 20px; }
.events { max-height: 260px; overflow: auto; padding-left: 22px; color: #d5ead8; line-height: 1.45; }
.events li { margin-bottom: 6px; }

.game-wrap { min-width: 0; }
canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid rgba(151, 255, 184, 0.25);
  background: #79b657;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.legend { display: flex; align-items: center; gap: 8px; color: #d5ead8; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-left: 12px; }
.dot:first-child { margin-left: 0; }
.dot.own { background: #ffd34d; }
.dot.player { background: #4da3ff; }
.dot.slime { background: #4caf50; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  h1 { font-size: 36px; }
}

.interact { width: 100%; background: #7e57c2; margin-top: 8px; }
.dialogue {
  margin-top: 12px;
  background: #1d1430;
  border: 1px solid rgba(190, 150, 255, 0.35);
  border-radius: 12px;
  padding: 12px;
}
.dialogue p { color: #e4dcf5; line-height: 1.5; margin: 6px 0 10px; }
.dialogue button { background: #39b968; }
.regions { display: flex; flex-wrap: wrap; gap: 8px; }
.regions button { background: #234534; font-size: 13px; padding: 8px 10px; }
.quests { padding-left: 20px; color: #d5ead8; line-height: 1.5; }
.dot.npc { background: #ab47bc; }
