:root {
  --bg: #07101c;
  --bg-2: #0c1626;
  --panel: rgba(12, 20, 34, 0.92);
  --panel-solid: #101a2b;
  --line: rgba(232, 214, 160, 0.14);
  --text: #e7eef8;
  --muted: #93a0b4;
  --gold: #e8c56b;
  --gold-2: #f3e2a8;
  --yellow: #ffe14a;
  --grey-dot: #a8b0bd;
  --danger: #e15b64;
  --ok: #7dcea0;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 70% -10%, rgba(232, 197, 107, 0.08), transparent 55%),
    var(--bg);
  font-family: var(--sans);
  font-weight: 400;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; color: inherit; }
img { max-width: 100%; display: block; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 22px;
  height: 68px;
  padding: 0 22px;
  background: rgba(7, 16, 28, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.brand strong { display: block; letter-spacing: 0.16em; font-size: 14px; }
.brand small { display: block; color: var(--muted); letter-spacing: 0.08em; font-size: 10px; text-transform: uppercase; }
.main-nav { display: flex; gap: 18px; margin: 0 auto; }
.main-nav a {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.main-nav a.is-active, .main-nav a:hover { color: var(--gold); }
.top-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.icon-btn, .lang-pill, .rev-menu-btn, .btn, .chip {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  border-radius: 999px;
}
.icon-btn, .lang-pill {
  width: 36px; height: 36px; display: grid; place-items: center;
  color: var(--gold-2); font-size: 14px;
}
.rev-menu { position: relative; }
.rev-menu-btn {
  height: 36px; padding: 0 14px; cursor: pointer; color: var(--gold);
  letter-spacing: 0.04em;
}
a.rev-menu-btn { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
a.rev-menu-btn.is-active { color: #1a1408; background: var(--gold); border-color: var(--gold); }
.rev-menu-panel {
  position: absolute; right: 0; top: 46px; width: 320px;
  max-height: 70vh; overflow: auto;
  background: #0e1828; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow); padding: 8px;
}
.rev-menu-panel h4 {
  margin: 10px 10px 6px; font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold);
}
.rev-menu-panel button {
  width: 100%; text-align: left; background: transparent; border: 0;
  color: var(--text); padding: 8px 10px; border-radius: 8px; cursor: pointer;
}
.rev-menu-panel button small { color: var(--muted); display: block; }
.rev-menu-panel button:hover { background: rgba(232, 197, 107, 0.08); }
.rev-menu-panel a {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
}
.rev-menu-panel a small { color: var(--muted); display: block; }
.rev-menu-panel a:hover { background: rgba(232, 197, 107, 0.08); }
.rev-menu-panel a .swatch { width: 10px; height: 10px; margin-top: 4px; }
#moveMenuPanel { width: 360px; }
.rev-person {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.rev-person img {
  width: 54px; height: 54px; object-fit: cover; object-position: center 18%;
  border-radius: 10px; background: #121a28;
}
.rev-person strong { display: block; font-size: 18px; line-height: 1.2; }
.rev-person:hover strong { color: var(--gold-2); }
.hero-photo .move-mark {
  width: 28px; height: 28px; border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(255,255,255,0.08), 0 0 24px currentColor;
}

.explore {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr) 300px;
  gap: 16px;
  padding: 18px 18px 8px;
  min-height: calc(100vh - 68px);
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.intro { padding: 22px 20px 16px; align-self: start; }
.kicker {
  color: var(--gold); letter-spacing: 0.2em; font-size: 11px; margin: 0 0 8px;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; }
.intro h1 { font-size: 46px; line-height: 0.92; letter-spacing: -0.02em; }
.intro .sub { color: var(--gold-2); margin: 10px 0 8px; font-size: 16px; }
.lede { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 16px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.stat { padding: 10px; border-radius: 12px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); }
.stat b { display: block; font-family: var(--serif); font-size: 26px; color: var(--gold-2); }
.stat span { color: var(--muted); font-size: 12px; }
.search-row, .admin-search { display: flex; gap: 8px; }
.search-row input, .filters select, .admin-form input, .admin-form select, .admin-form textarea, .admin-search input {
  width: 100%; background: #0b1422; border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 12px; outline: none;
}
.search-row button, .btn {
  cursor: pointer; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: linear-gradient(180deg, #3a3120, #241c10); color: var(--gold-2);
}
.btn.primary { background: linear-gradient(180deg, #f0d48a, #c6a15a); color: #1a1408; border-color: transparent; font-weight: 600; }
.btn.ghost { background: transparent; }
.btn.danger { color: #ffd0d3; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.filters label, .field label { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.filter-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.linkish { background: none; border: 0; color: var(--gold); cursor: pointer; padding: 0; }

.map-wrap {
  position: relative;
  height: 540px;
  max-height: 64vh;
  min-height: 420px;
  overflow: hidden;
  z-index: 1;
}
#leaflet {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #0b1522;
  touch-action: none;
}
.leaflet-container {
  font-family: var(--sans);
  background: #0b1522;
}
.map-wrap .leaflet-container {
  width: 100% !important;
  height: 100% !important;
}
.map-legend, .map-scale-note, .district-card, .detail-card {
  position: absolute; z-index: 5; background: rgba(8, 14, 24, 0.88);
  border: 1px solid var(--line); border-radius: 14px; backdrop-filter: blur(8px);
}
.map-legend { top: 14px; left: 14px; padding: 12px 14px; width: 230px; max-height: calc(100% - 28px); overflow: auto; }
.map-legend strong { display: block; margin-bottom: 8px; }
.legend-row { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--muted); margin: 4px 0; line-height: 1.3; }
.legend-row .dot { flex: 0 0 10px; margin-top: 3px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.yellow { background: var(--yellow); box-shadow: 0 0 10px var(--yellow); }
.dot.grey { background: var(--grey-dot); }
.map-tools { position: absolute; z-index: 5; top: 14px; right: 14px; display: flex; flex-direction: column; gap: 6px; }
.map-tools button {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(8,14,24,0.88); color: var(--text); cursor: pointer;
}
.map-count {
  position: absolute; z-index: 5; left: 14px; bottom: 14px;
  background: rgba(8,14,24,0.88); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 12px; font-size: 13px;
}
.map-count b { color: var(--gold); }

/* DOT SIZE is set in assets/js/map.js (pinSizes). These rules keep the marker box clear. */
.leaflet-marker-icon.pin-hit-wrap {
  background: transparent !important;
  border: none !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
}
.pin {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  position: relative;
  margin: 0;
  box-sizing: border-box;
  border: 2px solid #fff;
  flex: 0 0 auto;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.pin.primary {
  background: #FCD34D;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.7), 0 0 10px rgba(252, 211, 77, 0.95);
}
.leaflet-marker-icon:hover .pin,
.leaflet-marker-icon:hover .pin.primary {
  transform: scale(1.25);
}
.leaflet-marker-icon .pin.is-hot {
  transform: scale(2.4);
  box-shadow: 0 0 0 3px #fff, 0 0 0 8px rgba(255, 225, 74, 0.55), 0 0 22px currentColor !important;
  z-index: 3;
}
.pin.secondary { background: var(--grey-dot); box-shadow: 0 0 0 5px rgba(168, 176, 189, 0.18); }
.pin.primary::after, .pin.secondary::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid currentColor; opacity: 0;
}
.pin.primary { color: var(--yellow); }
.pin.secondary { color: var(--grey-dot); }
.pin:hover::after, .pin.is-hot::after { animation: pulse 1.4s ease-out infinite; opacity: 1; }
@keyframes pulse {
  from { transform: scale(0.7); opacity: 0.8; }
  to { transform: scale(1.8); opacity: 0; }
}

.detail-card {
  top: 74px; left: 14px; width: min(360px, calc(100% - 28px));
  padding: 14px; display: none;
}
.detail-card.open { display: block; }
.hover-box {
  position: absolute;
  z-index: 8;
  width: 230px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(243, 226, 168, 0.35);
  background: rgba(8, 14, 24, 0.55);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.leaflet-tooltip.dot-dialog,
.leaflet-tooltip.dot-dialog.leaflet-tooltip-top,
.leaflet-tooltip.dot-dialog.leaflet-tooltip-bottom {
  min-width: 0 !important;
  width: 248px !important;
  max-width: 248px !important;
  white-space: normal !important;
  text-align: left !important;
  background: #121a27 !important;
  background-color: #121a27 !important;
  border: 1px solid rgba(243, 226, 168, 0.28) !important;
  color: #f7f4ee !important;
  border-radius: 14px !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5) !important;
  padding: 0 !important;
  margin: 0 !important;
}
.leaflet-tooltip-top.dot-dialog::before {
  content: "" !important;
  position: absolute;
  left: calc(50% + var(--arrow-shift, 0px));
  bottom: -6px;
  width: 12px;
  height: 12px;
  margin-left: -6px !important;
  background: #121a27 !important;
  background-color: #121a27 !important;
  border: none !important;
  border-right: 1px solid rgba(243, 226, 168, 0.28) !important;
  border-bottom: 1px solid rgba(243, 226, 168, 0.28) !important;
  transform: rotate(45deg);
}
.leaflet-tooltip-bottom.dot-dialog::before {
  content: "" !important;
  position: absolute;
  left: calc(50% + var(--arrow-shift, 0px));
  top: -6px;
  bottom: auto;
  width: 12px;
  height: 12px;
  margin-left: -6px !important;
  background: #121a27 !important;
  background-color: #121a27 !important;
  border: none !important;
  border-left: 1px solid rgba(243, 226, 168, 0.28) !important;
  border-top: 1px solid rgba(243, 226, 168, 0.28) !important;
  transform: rotate(45deg);
}
@keyframes dotPop {
  from { opacity: 0; transform: translateY(8px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.spot-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: transparent;
  border-radius: 14px;
  color: #f7f4ee;
  text-align: left;
  overflow: hidden;
}
.spot-bar {
  display: block;
  height: 4px;
  width: 100%;
}
.spot-body {
  padding: 12px 14px 14px;
  text-align: left;
}
.spot-kicker,
.spot-card b,
.spot-year,
.spot-place,
.spot-card p {
  display: block;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  text-align: left;
  box-sizing: border-box;
}
.spot-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  color: #e7d7a4;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
}
.spot-kicker i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 8px;
}
.spot-card b {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
}
.spot-year {
  margin-top: 4px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.spot-place {
  margin-top: 2px;
  color: #c9d2df;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}
.spot-card p {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px;
  line-height: 1.45;
  color: #f3f5f8;
  font-weight: 400;
}
.hover-box.is-on { opacity: 1; transform: translateY(0) scale(1); }
.hover-box strong { display: block; font-family: var(--serif); font-size: 22px; line-height: 1; }
.hover-box p { margin: 6px 0 0; font-size: 12px; color: #d5deea; line-height: 1.4; }
.detail-card header { display: flex; gap: 12px; align-items: center; }
.detail-card h3 { font-size: 28px; line-height: 1; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; color: var(--muted); margin: 4px 0; }
.detail-card .actions { display: flex; gap: 8px; margin-top: 12px; }
.close-x { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 18px; }

.avatar, .avatar-lg {
  border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(160deg, #3c3422, #182233 60%, #101820);
  color: var(--gold-2); font-weight: 600; letter-spacing: 0.04em;
  border: 1px solid var(--line); overflow: hidden; flex: 0 0 auto;
}
.avatar { width: 54px; height: 54px; }
.avatar-lg { width: 74px; height: 92px; font-size: 22px; }
.avatar img, .avatar-lg img, .hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }

.side-list {
  padding: 0;
  align-self: start;
  height: min(760px, calc(100vh - 96px));
  max-height: min(760px, calc(100vh - 96px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.side-list h2 { font-size: 26px; }
.side-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.side-block { padding: 14px 14px 10px; min-height: 0; }
.side-note { margin: 0 0 8px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.side-people {
  flex: 1.2 1 0; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column;
  border-bottom: 1px solid var(--line);
}
.side-revolutions {
  flex: 0.8 1 0; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column;
  background: rgba(232, 197, 107, 0.04);
}
.move-scroll, .people-scroll {
  flex: 1 1 auto; min-height: 0; max-height: none; overflow: auto;
}
.move-row {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 10px;
  align-items: start;
  width: 100%;
  margin: 0 0 6px;
  padding: 8px 8px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  background: rgba(8, 14, 24, 0.45);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.move-row strong { display: block; font-size: 13px; line-height: 1.3; font-weight: 650; }
.move-row .tiny { display: block; }
.move-row.is-on {
  border-color: rgba(232, 197, 107, 0.7);
  background: rgba(232, 197, 107, 0.14);
}
.swatch {
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
}
.case {
  display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 10px; align-items: start;
  padding: 10px 6px; border-top: 1px solid var(--line); cursor: pointer; background: none; border-left: 0; border-right: 0; border-bottom: 0;
  width: 100%; text-align: left; border-radius: 10px;
}
.case:hover, .case.is-hot { background: rgba(232, 197, 107, 0.12); }
.case-copy { min-width: 0; }
.case strong { display: block; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.case .tiny { display: block; overflow-wrap: anywhere; }
.case-place { margin-top: 2px; }
.case .tiny.case-move {
  display: flex; align-items: flex-start; gap: 6px; margin-top: 3px; color: var(--gold-2);
}
.case .case-move span { min-width: 0; overflow-wrap: anywhere; }
.case-move .swatch { display: inline-block; width: 8px; height: 8px; margin-top: 4px; flex: 0 0 auto; }
.case .avatar { width: 46px; height: 46px; }
.badge { display: inline-block; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: #1a1408; background: var(--gold); border-radius: 999px; padding: 2px 7px; }
.badge.grey { background: #c5ccd6; }

.dash {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr 0.9fr;
  gap: 12px;
  padding: 8px 18px 22px;
}
.card { padding: 16px; }
.card h3 { font-size: 26px; margin-bottom: 4px; }
.timeline-line { position: relative; margin-top: 28px; height: 90px; }
.timeline-line .bar {
  position: absolute; left: 0; right: 0; top: 10px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--danger), var(--gold), transparent);
}
.ticks { display: flex; justify-content: space-between; position: relative; }
.tick { width: 18%; font-size: 12px; color: var(--muted); }
.tick b { display: block; color: var(--gold-2); margin-bottom: 18px; }
.tick i {
  width: 10px; height: 10px; border-radius: 50%; background: var(--gold); display: block; margin-bottom: 8px;
  box-shadow: 0 0 10px var(--gold);
}
.donut-wrap { display: flex; gap: 14px; align-items: center; margin-top: 12px; }
.donut {
  width: 120px; height: 120px; border-radius: 50%;
  display: grid; place-items: center; position: relative;
}
.donut span {
  width: 78px; height: 78px; border-radius: 50%; background: #101a2b;
  display: grid; place-items: center; text-align: center; font-size: 12px; color: var(--muted);
}
.donut strong { display: block; color: var(--text); font-family: var(--serif); font-size: 28px; }
.legend-list { font-size: 13px; color: var(--muted); }
.legend-list div { margin: 6px 0; }
.bars { margin-top: 10px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 36px; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); margin: 6px 0; }
.bar-row .track { height: 7px; background: #1b2636; border-radius: 99px; overflow: hidden; }
.bar-row .fill { height: 100%; background: linear-gradient(90deg, #f0d48a, #e15b64); }
.feature { display: grid; grid-template-columns: 74px 1fr; gap: 12px; margin-top: 8px; }

.site-footer {
  display: flex; justify-content: space-between; gap: 18px; align-items: center;
  padding: 18px 22px 28px; color: var(--muted); border-top: 1px solid var(--line); font-size: 13px;
}
.site-footer .quote { color: var(--gold-2); font-family: var(--serif); font-size: 18px; }

.page { padding: 28px 22px 50px; max-width: 1180px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 18px; }
.page h1 { font-size: 58px; line-height: 0.9; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.toolbar select, .toolbar input { background: #0b1422; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.dir-list { display: grid; gap: 8px; }
.dir-row {
  display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 12px; border: 1px solid var(--line); border-radius: 14px;
  background: rgba(11, 21, 34, 0.72);
}
.dir-row:hover { border-color: rgba(232, 197, 107, 0.45); background: rgba(232, 197, 107, 0.08); }
.dir-row img, .dir-mark {
  width: 46px; height: 46px; border-radius: 12px; object-fit: cover;
}
.dir-mark { display: grid; place-items: center; }
.dir-row strong { display: block; font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
.dir-row .tiny { display: block; overflow-wrap: anywhere; }
.dir-move { display: flex; align-items: flex-start; gap: 6px; margin-top: 3px; color: var(--gold-2); }
.dir-move span { min-width: 0; overflow-wrap: anywhere; }
.dir-move .swatch { width: 8px; height: 8px; margin-top: 4px; flex: 0 0 auto; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.profile-card { padding: 14px; display: grid; gap: 8px; min-height: 220px; }
.profile-photo { width: 100%; height: 190px; object-fit: cover; object-position: center 18%; border-radius: 12px; background: #121a28; }
.profile-card:hover { border-color: rgba(232, 197, 107, 0.45); }
.profile-card h3 { font-size: 30px; }

.era-stack { display: grid; gap: 14px; }
.era-block { padding: 16px 18px 8px; }
.era-head h3 { font-size: 32px; color: var(--gold-2); }
.era-list { display: grid; gap: 0; }
.era-person {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) minmax(120px, 180px);
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.era-person strong { color: var(--gold-2); }
.era-person span { min-width: 0; }
.era-who { display: flex; align-items: center; gap: 10px; }
.era-photo { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; object-position: center 18%; flex: 0 0 auto; background: #121a28; }
.era-person em { font-style: normal; color: var(--muted); text-align: right; }
.era-person:hover span { color: var(--gold); }
@media (max-width: 720px) {
  .era-person { grid-template-columns: 64px 1fr; }
  .era-person em { grid-column: 2; text-align: left; }
}

.hero-profile { display: grid; grid-template-columns: 280px 1fr; gap: 22px; align-items: start; }
.hero-photo {
  height: 340px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(160deg, #3c3422, #121a28);
  display: grid; place-items: center; font-family: var(--serif); font-size: 72px; color: var(--gold-2);
}
.info-box { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.info-box div, .prose, .quote-card { background: var(--panel-solid); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.stack { display: grid; gap: 12px; margin-top: 16px; }
.prose p { color: #d5deea; line-height: 1.6; }
.account h3 { font-size: 28px; margin: 6px 0 10px; }
.account h3 + h3, .account p + h3, .account h4 + h3 { margin-top: 22px; }
.account h4 { font-size: 18px; margin: 14px 0 6px; color: var(--gold-2); }
.account p { margin: 0 0 10px; overflow-wrap: anywhere; }
.related { display: flex; gap: 10px; flex-wrap: wrap; }

.admin-wrap { max-width: 1180px; margin: 0 auto; padding: 8px 18px 60px; }
.admin-nav {
  display: flex; flex-wrap: wrap; gap: 8px;
  max-width: 1180px; margin: 16px auto 0; padding: 0 18px;
}
.admin-nav a, .admin-tabs a {
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
  color: var(--gold-2); font-size: 13px; letter-spacing: 0.04em;
}
.admin-nav a:hover, .admin-tabs a:hover { border-color: var(--gold); }
.admin-nav a.is-on, .admin-tabs a.is-on {
  background: linear-gradient(180deg, #f0d48a, #c6a15a); color: #1a1408; border-color: transparent; font-weight: 600;
}
.admin-tabs { display: flex; gap: 8px; margin: 4px 0 18px; }
.move-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.move-photo { display: block; width: 100%; max-height: 180px; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }
.rev-card h3 { font-size: 26px; line-height: 1.15; margin: 6px 0; }
.rev-card h3 .dot { margin-right: 8px; vertical-align: middle; }
.rev-card-link { color: inherit; display: block; }
.rev-card-link:hover h3 { color: var(--gold-2); }
.rev-meta { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 4px 0; }
.rev-open { margin: 12px 0 0; color: var(--gold-2); font-size: 13px; letter-spacing: 0.04em; }
.rev-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.page-head .rev-actions { margin-top: 0; }
.rev-name-tag { display: block; margin-top: 4px; color: var(--gold-2); font-size: 12px; letter-spacing: 0.03em; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.row-actions form { display: inline; margin: 0; }
tr.stay-row { scroll-margin-top: 96px; }
tr.stay-row.is-back td { background: rgba(232, 197, 107, 0.1); }
.rev-sheet { display: grid; grid-template-columns: 280px 1fr; gap: 18px; margin-bottom: 16px; align-items: start; }
.rev-sheet-photo { max-height: 280px; margin-bottom: 0; }
.empty-photo {
  height: 180px; border-radius: 12px; border: 1px solid var(--line);
  display: grid; place-items: center; background: #121a28;
}
.empty-photo .dot { width: 22px; height: 22px; }
.rev-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.rev-facts div { background: rgba(0, 0, 0, 0.2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.rev-facts span { display: block; color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.rev-account { margin-top: 14px; color: #d5deea; line-height: 1.6; white-space: pre-wrap; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.admin-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-form .wide { grid-column: 1 / -1; }
.picker-pin {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-sizing: border-box;
}
#picker,
#picker.leaflet-container {
  display: block;
  height: 480px !important;
  min-height: 480px !important;
  width: 100% !important;
  position: relative;
  z-index: 2;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0b1522;
  overflow: hidden;
}
.note { color: var(--muted); font-size: 13px; }
.login-box { max-width: 420px; margin: 10vh auto; padding: 24px; }
.flash { background: rgba(125, 206, 160, 0.1); border: 1px solid rgba(125, 206, 160, 0.3); color: var(--ok); padding: 10px 12px; border-radius: 10px; }

.empty { padding: 28px; text-align: center; color: var(--muted); }

@media (max-width: 1280px) {
  .topbar { gap: 12px; padding: 0 14px; }
  .main-nav { gap: 12px; }
  .rev-menu-btn { padding: 0 10px; font-size: 13px; }
}
@media (max-width: 1100px) {
  .explore, .dash, .hero-profile { grid-template-columns: 1fr; }
  .map-wrap { height: 420px; min-height: 420px; max-height: none; }
  .main-nav { display: none; }
  .intro h1, .page h1 { font-size: 42px; }
  .side-list { height: auto; max-height: none; overflow: visible; }
  .side-people, .side-revolutions { flex: none; overflow: visible; display: block; }
  .people-scroll, .move-scroll { max-height: 320px; flex: none; }
  .case { grid-template-columns: 42px minmax(0, 1fr); }
  .case .avatar { width: 42px; height: 42px; }
}
@media (max-width: 720px) {
  .topbar {
    height: auto; min-height: 56px; flex-wrap: wrap; align-items: center;
    row-gap: 8px; padding: 8px 12px;
  }
  .brand { min-width: 0; flex: 1 1 auto; }
  .brand small { display: none; }
  .top-tools { width: 100%; margin-left: 0; flex-wrap: wrap; gap: 8px; }
  .rev-menu-panel, #moveMenuPanel { width: min(360px, calc(100vw - 24px)); max-width: calc(100vw - 24px); }
  .toolbar input, .toolbar select, .toolbar .btn { flex: 1 1 140px; }
  .dir-row { grid-template-columns: 40px minmax(0, 1fr); padding: 10px; }
  .dir-row img, .dir-mark { width: 40px; height: 40px; }
  .dir-row strong { font-size: 16px; }
  .page h1 { font-size: 36px; }
  .stats, .filters, .admin-form, .info-box, .rev-sheet, .rev-facts { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}
