* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: Georgia, "Times New Roman", serif; color: #2b2118; }
body { display: flex; background: #1c1712; }
#side { width: 380px; max-width: 90vw; height: 100%; overflow-y: auto; background: #f3ead6; border-right: 3px solid #5b4630; padding: 14px 16px 40px; z-index: 1000; }
#map { flex: 1; height: 100%; background: #6aa0d6; }
header h1 { margin: 0; font-size: 1.35rem; color: #5b2a1a; }
.sub { margin: 2px 0 12px; color: #7a6650; font-size: .85rem; }
h2 { font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; color: #5b4630; border-bottom: 1px solid #c9b78f; padding-bottom: 3px; }
.layer { display: flex; align-items: center; gap: 8px; margin: 5px 0; font-size: .92rem; cursor: pointer; }
.swatch { width: 26px; height: 5px; border-radius: 3px; display: inline-block; }
.chapter { margin: 14px 0 4px; font-weight: bold; color: #5b2a1a; }
.event { padding: 7px 9px; margin: 4px 0; background: #fbf6ea; border: 1px solid #d8c9a4; border-radius: 6px; cursor: pointer; }
.event:hover, .event.active { background: #f0dfb4; border-color: #b8923a; }
.event .t { font-weight: bold; font-size: .95rem; }
.event .w { font-size: .78rem; color: #7a6650; }
.num { display: inline-block; min-width: 22px; height: 22px; line-height: 22px; text-align: center; border-radius: 50%; background: #5b2a1a; color: #fff; font-size: .75rem; margin-right: 6px; }
.pin { background: #5b2a1a; color: #fff; border: 2px solid #f3ead6; border-radius: 50%; text-align: center; font: bold 12px/22px Georgia, serif; width: 26px; height: 26px; line-height: 22px; box-shadow: 0 1px 4px rgba(0,0,0,.6); }
.pin.approx { background: #8a6d2f; border-style: dashed; }
.pin.now { background: #b00020; }
.leaflet-popup-content { font-family: Georgia, serif; max-width: 280px; }
.leaflet-popup-content h3 { margin: 0 0 4px; color: #5b2a1a; font-size: 1rem; }
.leaflet-popup-content .pe { border-top: 1px solid #ddd; margin-top: 6px; padding-top: 6px; }
.leaflet-popup-content .who { font-size: .78rem; color: #7a6650; }
.approx-note { font-size: .72rem; color: #8a6d2f; font-style: italic; }
#toggle { display: none; position: fixed; top: 10px; left: 10px; z-index: 1100; width: 42px; height: 42px; font-size: 1.3rem; border: 2px solid #5b4630; background: #f3ead6; border-radius: 8px; }
@media (max-width: 760px) {
  #side { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; width: 88vw; }
  body.open #side { transform: translateX(0); }
  #toggle { display: block; }
}

#charList { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.charbtn { font: inherit; font-size: .85rem; padding: 4px 10px; border-radius: 14px; border: 2px solid var(--c); background: #fbf6ea; color: #2b2118; cursor: pointer; }
.charbtn.on { background: var(--c); color: #fff; }
.chip { display: inline-block; color: #fff; font-size: .68rem; padding: 1px 7px; border-radius: 9px; margin: 3px 3px 3px 0; }
.know { margin-top: 4px; padding: 3px 6px; font-size: .78rem; background: #f5e3c8; border-left: 3px solid #b8923a; color: #5b2a1a; }
