* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f1ea;
  padding: 24px;
}
.app-frame {
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid #ddd6c8;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid #ddd6c8;
}
.topbar-logo { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.dev-tag { font-size: 10px; font-weight: 500; color: #9a8f73; background: #f0ead9; padding: 2px 8px; border-radius: 10px; }
.overlay-toggles { display: flex; gap: 6px; flex-wrap: wrap; }
.toggle-btn {
  font-size: 11px; padding: 4px 10px; border-radius: 20px;
  border: 1px solid #ccc; background: #fff; color: #555; cursor: pointer;
}
.toggle-btn.on { background: #e6f1fb; color: #185fa5; border-color: #85b7eb; }

.main-area { display: grid; grid-template-columns: 6fr 4fr; height: 420px; }
.map-area { position: relative; background: #b8d4e8; border-right: 1px solid #ddd6c8; }
#map { width: 100%; height: 100%; }
.map-placeholder-note {
  position: absolute; bottom: 8px; left: 8px; right: 8px;
  font-size: 10px; color: rgba(255,255,255,0.9); background: rgba(0,0,0,0.4);
  padding: 6px 8px; border-radius: 6px; pointer-events: none;
}

.info-panel { display: flex; flex-direction: column; overflow: hidden; }
.panel-header { padding: 14px 16px 10px; border-bottom: 1px solid #ddd6c8; }
.period-title { font-size: 15px; font-weight: 600; }
.period-subtitle { font-size: 12px; color: #888; margin-top: 2px; }
.panel-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid #ddd6c8; }
.tab {
  flex: 1 1 33%; padding: 7px 2px; text-align: center; font-size: 11px;
  color: #888; cursor: pointer; border-bottom: 2px solid transparent;
}
.tab.active { color: #185fa5; border-bottom-color: #185fa5; font-weight: 600; }
.panel-content { flex: 1; overflow-y: auto; padding: 14px 16px; font-size: 13px; line-height: 1.6; color: #444; }
.panel-content .empty { color: #aaa; font-style: italic; }
.fauna-card, .people-card {
  padding: 8px 10px; background: #f7f5ee; border-radius: 8px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 10px;
}
.fauna-card-img {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 8px;
  background: #e9e4d4; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.fauna-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fauna-card-img .placeholder-icon { font-size: 16px; color: #b3ab97; }
.fauna-card-text { display: flex; flex-direction: column; }
.content-block { margin-bottom: 12px; }
.fauna-card p, .people-card p { font-weight: 600; font-size: 13px; color: #222; margin: 0; }
.fauna-card span, .people-card span { font-size: 11px; color: #888; }

.timeline-bar { border-top: 1px solid #ddd6c8; padding: 10px 16px; }
.timeline-label { font-size: 11px; color: #888; margin-bottom: 8px; }
.timeline-periods { display: flex; gap: 4px; overflow-x: auto; }
.period-btn {
  flex: 1 0 80px; padding: 5px 4px; text-align: center; border-radius: 8px;
  border: 1px solid #ddd6c8; cursor: pointer; background: #fff;
}
.period-btn.active { background: #e6f1fb; border-color: #85b7eb; }
.period-btn .p-name { font-size: 9px; font-weight: 600; }
.period-btn .p-age { font-size: 8px; color: #999; margin-top: 1px; }
