:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #101411;
  color: #eee8d9;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at 12% 0%, #26382a 0, #101411 35rem), #101411;
}

button { font: inherit; }

.shell { max-width: 1440px; margin: 0 auto; padding: 34px 30px 44px; }
.topbar { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 8px; color: #8fa88c; font-size: 10px; font-weight: 800; letter-spacing: .19em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 700px; margin-bottom: 0; color: #f7f0df; font: 500 clamp(28px, 4vw, 50px)/1.02 Georgia, serif; letter-spacing: -.035em; }
h2 { margin-bottom: 4px; color: #f7f0df; font: 600 23px/1.1 Georgia, serif; }
.world-status { display: flex; align-items: center; gap: 10px; color: #d7ceb9; font-size: 13px; white-space: nowrap; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #e0a95b; box-shadow: 0 0 14px #e0a95b; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.world-card, .panel { border: 1px solid #344037; background: rgba(22, 29, 23, .86); box-shadow: 0 18px 60px rgba(0, 0, 0, .24); }
.world-card { position: relative; overflow: hidden; border-radius: 18px; }
#world { display: block; width: 100%; height: auto; background: #1d2d22; cursor: crosshair; }
.canvas-help { position: absolute; left: 16px; top: 14px; color: rgba(247, 240, 223, .7); font-size: 11px; }
.controls { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #344037; }
.speed { cursor: pointer; border: 1px solid #465345; border-radius: 99px; padding: 7px 12px; color: #aebba8; background: #1a241c; font-size: 12px; transition: .2s ease; }
.speed:hover, .speed.active { border-color: #e0a95b; color: #171c17; background: #e0a95b; }
.sidebar { display: grid; gap: 18px; }
.panel { border-radius: 16px; padding: 19px; }
.empty-state { min-height: 85px; display: grid; place-items: center; border: 1px dashed #4a5748; border-radius: 10px; color: #84907f; font-size: 13px; text-align: center; }
.person-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.avatar { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 50%; color: #152017; font: 700 18px Georgia, serif; }
#person-meta { margin-bottom: 0; color: #8e9c8b; font-size: 12px; }
.person-summary { min-height: 36px; color: #c5cdbd; font-size: 13px; line-height: 1.45; }
.bars { display: grid; gap: 7px; margin: 15px 0; }
.bar-row { display: grid; grid-template-columns: 66px 1fr 25px; align-items: center; gap: 8px; color: #8e9c8b; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.bar { height: 5px; overflow: hidden; border-radius: 4px; background: #303b31; }
.bar i { display: block; height: 100%; border-radius: inherit; background: #c98957; }
.trait-list { display: flex; flex-wrap: wrap; gap: 5px; }
.trait { border: 1px solid #405041; border-radius: 99px; padding: 5px 8px; color: #b7c6b3; font-size: 11px; }
.memory-box { margin-top: 16px; padding-top: 14px; border-top: 1px solid #344037; }
.memory-box ul { display: grid; gap: 8px; margin: 0; padding-left: 18px; color: #bdc5b6; font-size: 12px; line-height: 1.4; }
.panel-title-row { display: flex; justify-content: space-between; }
.event-count { color: #d79a5d; font-size: 11px; }
.event-log { display: grid; gap: 10px; max-height: 255px; overflow: hidden; }
.event { padding-bottom: 10px; border-bottom: 1px solid #2d382e; color: #aeb8a9; font-size: 12px; line-height: 1.4; }
.event:last-child { border-bottom: 0; }
.event-time { display: block; margin-bottom: 2px; color: #738373; font-size: 10px; }

@media (max-width: 940px) {
  .topbar { align-items: start; flex-direction: column; }
  .game-layout { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .shell { padding: 22px 14px 30px; }
  .sidebar { grid-template-columns: 1fr; }
  .world-status { font-size: 12px; }
}
