

@font-face { font-family: 'Cinzel'; font-weight: 500; font-style: normal; font-display: swap; src: url('../assets/fonts/Cinzel-500.ttf') format('truetype'); }
@font-face { font-family: 'Cinzel'; font-weight: 700; font-style: normal; font-display: swap; src: url('../assets/fonts/Cinzel-700.ttf') format('truetype'); }
@font-face { font-family: 'Crimson Text'; font-weight: 400; font-style: normal; font-display: swap; src: url('../assets/fonts/CrimsonText-Regular-400.ttf') format('truetype'); }
@font-face { font-family: 'Crimson Text'; font-weight: 400; font-style: italic; font-display: swap; src: url('../assets/fonts/CrimsonText-Italic-400.ttf') format('truetype'); }
@font-face { font-family: 'Crimson Text'; font-weight: 600; font-style: normal; font-display: swap; src: url('../assets/fonts/CrimsonText-600.ttf') format('truetype'); }

body.ms2w-theme {
  --ms2-bg: #0b0906;
  --ms2-bg-deep: #050403;
  
  --ms2-panel: rgba(15,12,10,0.97);
  --ms2-bone: #d8cdb8;
  --ms2-ember: #c97a2b;
  --ms2-ember-dim: #8a5a2b;
  --ms2-gold: #b08a3e;
  --ms2-text: #e9e2d3;
  --ms2-muted: #8f867a;
  --ms2-danger: #7a2020;
  background: linear-gradient(180deg, var(--ms2-bg) 0%, var(--ms2-bg-deep) 100%) !important;
  color: var(--ms2-text) !important;
  font-family: 'Inter', 'Segoe UI', sans-serif;
}
body.ms2w-theme .ms2w-backdrop img { opacity: 0.22; filter: grayscale(0.15) contrast(1.05); }
body.ms2w-theme h1, body.ms2w-theme h2.ms2w-h2, body.ms2w-theme h3.ms2w-h3,
body.ms2w-theme .ms2w-infobox-name, body.ms2w-theme .ms2w-hub-brand {
  font-family: 'Cinzel', Georgia, serif;
  color: var(--ms2-bone);
  letter-spacing: 0.03em;
  
  font-variant-caps: all-small-caps;
}

body.ms2w-theme h2.ms2w-h2 {
  border-bottom: none; padding-bottom: 0.5rem;
  background: url('../assets/chrome/chrome-divider-gold.png') no-repeat left bottom / 260px 6px;
}
body.ms2w-theme .ms2w-heading-danger h2.ms2w-h2, body.ms2w-theme h2.ms2w-h2.ms2w-heading-danger {
  background-image: url('../assets/chrome/chrome-divider-red.png');
}
body.ms2w-theme a { color: var(--ms2-ember); }
body.ms2w-theme a:hover { color: #e0a35a; }

body.ms2w-theme .ms2w-title-rule {
  border: none; height: 6px;
  background: url('../assets/chrome/chrome-divider-gold.png') repeat-x left top / 260px 6px;
  opacity: 0.9;
}
body.ms2w-theme #ms2w-content, body.ms2w-theme .ms2w-cat,
body.ms2w-theme .ms2w-card, body.ms2w-theme .ms2w-school-tile, body.ms2w-theme .ms2w-hub-tile,
body.ms2w-theme .ms2w-callout, body.ms2w-theme .ms2w-notice, body.ms2w-theme .ms2w-toc {
  background: var(--ms2-panel) !important;
  border-color: rgba(201,122,43,0.22) !important;
}
body.ms2w-theme .ms2w-toc a.is-active, body.ms2w-theme .ms2w-toc a:hover { border-left-color: var(--ms2-ember); color: var(--ms2-ember); }

body.ms2w-theme #ms2w-page { background: transparent !important; border: none !important; }

body.ms2w-theme .ms2w-frame-top, body.ms2w-theme .ms2w-frame-bottom { background-image: url('../assets/chrome/chrome-border-h.png'); opacity: 0.8; }
body.ms2w-theme .ms2w-frame-left, body.ms2w-theme .ms2w-frame-right { background-image: url('../assets/chrome/chrome-border-v.png'); opacity: 0.8; }


body.ms2w-theme .ms2w-infobox-cap-top { background-image: url('../assets/chrome/chrome-infobox-cap-top.png'); }
body.ms2w-theme .ms2w-infobox-seam { background-image: url('../assets/chrome/chrome-infobox-seam.png'); }
body.ms2w-theme .ms2w-infobox-cap-bottom { background-image: url('../assets/chrome/chrome-infobox-cap-bottom.png'); }
body.ms2w-theme .ms2w-infobox-head { background-image: url('../assets/chrome/chrome-infobox-header.png'); }
body.ms2w-theme .ms2w-infobox-body { background-image: url('../assets/chrome/chrome-infobox-body.png'); }
body.ms2w-theme .ms2w-table th { background: rgba(201,122,43,0.14) !important; color: var(--ms2-bone); }
body.ms2w-theme .ms2w-table td, body.ms2w-theme .ms2w-table th { border-color: rgba(201,122,43,0.16) !important; }
body.ms2w-theme .ms2w-flavor { border-left: 3px solid var(--ms2-ember-dim); color: var(--ms2-bone); font-style: italic; font-family: 'Crimson Text', Georgia, serif; font-size: 1.05rem; }
body.ms2w-theme .ms2w-flavor cite { display: block; margin-top: 0.35rem; font-style: normal; font-size: 0.75rem; color: var(--ms2-muted); font-family: 'Inter', 'Segoe UI', sans-serif; }
body.ms2w-theme .ms2w-effect { background: rgba(176,138,62,0.1); border-color: var(--ms2-gold); color: var(--ms2-bone); font-family: 'Crimson Text', Georgia, serif; font-size: 1.02rem; }
body.ms2w-theme .ms2w-notice--warn { border-color: var(--ms2-danger) !important; background: rgba(122,32,32,0.18) !important; }
body.ms2w-theme code { color: var(--ms2-ember); }
body.ms2w-theme .ms2w-dialogue { margin: 0 0 0.7rem; border: 1px solid rgba(201,122,43,0.22); border-radius: 4px; background: rgba(20,16,13,0.35); }
body.ms2w-theme .ms2w-dialogue summary { cursor: pointer; padding: 0.6rem 1rem; font-family: 'Cinzel', Georgia, serif; font-weight: 600; color: var(--ms2-bone); list-style: none; }
body.ms2w-theme .ms2w-dialogue summary::-webkit-details-marker { display: none; }
#forge-upgrades { margin-top: 0; margin-bottom: 0.3rem; }
.ms2w-forge-block #forge-upgrades ~ p { margin: 0.2rem 0; }
.ms2w-forge-block #forge-upgrades ~ h3.ms2w-h3 { margin: 0.5rem 0 0.2rem; }
.ms2w-forge {
  margin: 0.25rem 0 0.4rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  padding: 0.2rem 0.65rem 0.5rem;
  background: rgba(0,0,0,0.18);
}
.ms2w-forge > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.3rem 0;
  list-style: disclosure-closed;
}
.ms2w-forge[open] > summary { margin-bottom: 0.3rem; }
body.ms2w-theme .ms2w-dialogue summary::before { content: '▸ '; color: var(--ms2-ember); }
body.ms2w-theme .ms2w-dialogue[open] summary::before { content: '▾ '; }
body.ms2w-theme .ms2w-dialogue-scene { padding: 0.3rem 1.2rem 0.9rem; border-top: 1px solid rgba(201,122,43,0.12); }
body.ms2w-theme .ms2w-dialogue-scene h4 { margin: 0.6rem 0 0.3rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ms2-muted); }
body.ms2w-theme .ms2w-dialogue-scene p { margin: 0.25rem 0; font-family: 'Crimson Text', Georgia, serif; font-style: italic; color: var(--ms2-bone); font-size: 1.05rem; }

body.ms2w-theme .ms2w-lore-toc { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; list-style: none; margin: 0 0 1.4rem; padding: 0.7rem 1rem; background: rgba(20,16,13,0.4); border: 1px solid rgba(201,122,43,0.22); border-radius: 4px; }
body.ms2w-theme .ms2w-lore-list { display: grid; gap: 1rem; margin: 0 0 1.6rem; }
body.ms2w-theme .ms2w-lore-note { padding: 1rem 1.3rem; background: rgba(20,16,13,0.4); border: 1px solid rgba(201,122,43,0.22); border-left: 3px solid var(--ms2-ember); border-radius: 4px; }
body.ms2w-theme .ms2w-lore-note p:not(.ms2w-lore-foot) { margin: 0 0 0.6rem; font-family: 'Crimson Text', Georgia, serif; font-style: italic; color: var(--ms2-bone); font-size: 1.08rem; line-height: 1.6; }
body.ms2w-theme .ms2w-lore-note p:not(.ms2w-lore-foot):last-of-type { margin-bottom: 0; }
body.ms2w-theme .ms2w-lore-foot { margin: 0.7rem 0 0; padding-top: 0.5rem; border-top: 1px solid rgba(201,122,43,0.12); font-size: 0.82rem; font-style: normal; }

.ms2w-top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.7rem 1.5rem;
  background: rgba(8,6,5,0.97);
  border-bottom: 2px solid transparent;
  backdrop-filter: blur(8px);
  max-width: 100%; box-sizing: border-box;
}

body.ms2w-theme .ms2w-top {
  box-shadow: 0 2px 0 0 rgba(0,0,0,0.6);
  background-image: linear-gradient(rgba(8,6,5,0.97), rgba(8,6,5,0.97)), url('../assets/chrome/chrome-divider-gold.png');
  background-repeat: no-repeat, repeat-x; background-position: top left, bottom left; background-size: auto, 260px 5px;
  padding-bottom: calc(0.7rem + 5px);
}
.ms2w-logo-img { display: block; height: 38px; }
.ms2w-logo { display: flex; align-items: center; text-decoration: none; flex: none; }
.ms2w-logo-text { color: #f2ebe0; font-weight: 700; font-family: 'Cinzel', serif; font-size: 1.1rem; }
.ms2w-nav { font-size: 0.98rem; }
.ms2w-nav-list { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem; list-style: none; margin: 0; padding: 0; }
.ms2w-nav a { color: #d9cdb9; text-decoration: none; font-weight: 600; letter-spacing: 0.01em; }
.ms2w-nav a:hover { color: var(--ms2-ember); }
.ms2w-nav-item { position: relative; }
.ms2w-nav-item > a {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.65rem 0.75rem;
  border-bottom: 2px solid transparent; transition: border-color 0.15s ease, color 0.15s ease;
}
.ms2w-nav-item > a:hover { border-bottom-color: rgba(201,122,43,0.65); }
.ms2w-nav-caret { font-size: 0.6em; opacity: 0.8; }
.ms2w-nav-menu {
  display: none; position: absolute; top: 100%; left: 0; z-index: 60;
  list-style: none; margin: 0; padding: 0.5rem 0; min-width: 210px;
  background: rgba(12,10,8,0.99); border: 1px solid rgba(201,122,43,0.35);
  border-radius: 4px; box-shadow: 0 12px 28px rgba(0,0,0,0.55);
  font-size: 0.94rem;
}
.ms2w-nav-menu li a { display: block; padding: 0.55rem 1rem; white-space: nowrap; font-weight: 500; border-left: 2px solid transparent; }
.ms2w-nav-menu li a:hover { background: rgba(201,122,43,0.14); border-left-color: var(--ms2-ember); }
.ms2w-nav-item--menu:hover .ms2w-nav-menu,
.ms2w-nav-item--menu:focus-within .ms2w-nav-menu { display: block; }
.ms2w-nav-toggle {
  display: none; margin-left: auto; background: rgba(0,0,0,0.45);
  border: 1px solid rgba(201,122,43,0.35); color: #e6ddcd; border-radius: 4px;
  width: 2.4rem; height: 2.4rem; font-size: 1.2rem; cursor: pointer; line-height: 1;
}
.ms2w-search-wrap {
  position: relative; margin-left: auto; min-width: 180px; max-width: 280px; width: 26%; flex: none;
}
.ms2w-search {
  width: 100%;
  background: rgba(0,0,0,0.45); border: 1px solid rgba(201,122,43,0.32);
  color: #e6ddcd; padding: 0.5rem 0.8rem; border-radius: 4px; font-size: 0.92rem;
}
.ms2w-search:focus { outline: none; border-color: var(--ms2-ember); }
.ms2w-search-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 120;
  max-height: min(70vh, 420px); overflow-y: auto;
  background: rgba(12,10,8,0.98); border: 1px solid rgba(201,122,43,0.4); border-radius: 4px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.55);
}
.ms2w-search-results[hidden] { display: none !important; }
.ms2w-search-hit {
  display: block; padding: 0.55rem 0.75rem; border-bottom: 1px solid rgba(201,122,43,0.12);
  color: #e6ddcd; text-decoration: none; border-left: 2px solid transparent;
}
.ms2w-search-hit:last-child { border-bottom: none; }
.ms2w-search-hit:hover, .ms2w-search-hit.is-active {
  background: rgba(201,122,43,0.14); border-left-color: var(--ms2-ember);
}
.ms2w-search-hit strong { display: block; font-size: 0.92rem; }
.ms2w-search-hit span { display: block; font-size: 0.75rem; opacity: 0.65; margin-top: 0.15rem; }
.ms2w-search-empty { padding: 0.7rem 0.75rem; font-size: 0.85rem; opacity: 0.7; }
.ms2w-footer {
  position: relative; z-index: 1;
  text-align: center; padding: 1.25rem;
  color: #8f887c; font-size: 0.8rem;
  border-top: 1px solid rgba(201,122,43,0.2);
  background: rgba(6,5,4,0.9);
}
.ms2w-footer p { margin: 0.35rem 0; }
.site-footer-copy { margin-top: 0.7rem; letter-spacing: 0.02em; }


.ms2-kw { color: var(--ms2-ember); font-weight: 600; text-decoration: none; border-bottom: 1px dotted transparent; }
a.ms2-kw { border-bottom-color: currentColor; cursor: help; }
a.ms2-kw:hover { opacity: 0.8; }

.ms2w-hub-tile { min-height: 100px; position: relative; overflow: hidden; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; }
.ms2w-hub-tile-icon { position: relative; z-index: 1; }
.ms2w-hub-tile-label { position: relative; z-index: 1; }
.ms2w-cat { min-height: 220px; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; }


.ms2w-hub-tile, .ms2w-cat, .ms2w-school-tile, .ms2w-card {
  position: relative; border-top: none !important;
}
.ms2w-hub-tile::before, .ms2w-cat::before, .ms2w-school-tile::before, .ms2w-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: url('../assets/chrome/chrome-bar-h.png') repeat-x left top / auto 4px;
  opacity: 0.85; border-radius: 6px 6px 0 0;
}
.ms2w-hub-tile:hover, .ms2w-cat:hover, .ms2w-school-tile:hover, .ms2w-card:hover {
  transform: translateY(-3px);
  border-color: rgba(201,122,43,0.55) !important;
  box-shadow: 0 10px 24px rgba(0,0,0,0.45), 0 0 0 1px rgba(201,122,43,0.25), 0 0 22px rgba(201,122,43,0.18);
}


.ms2w-hub-tile-icon, .ms2w-school-icon, .ms2w-card-icon, .ms2w-card-ph, .ms2w-infobox-img {
  position: relative; z-index: 1;
}
.ms2w-school-tile, .ms2w-card-icon-link, .ms2w-hub-tile { position: relative; }
.ms2w-school-tile::after, .ms2w-hub-tile::after, .ms2w-card-icon-link::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 94px; height: 94px;
  transform: translate(-50%, -50%); background: url('../assets/chrome/chrome-glow.png') no-repeat center / contain;
  filter: sepia(1) saturate(4) hue-rotate(-25deg) brightness(0.9); opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease; z-index: -1;
}
.ms2w-hub-tile::after { top: 38%; }
.ms2w-school-tile:hover::after, .ms2w-hub-tile:hover::after, .ms2w-card:hover .ms2w-card-icon-link::after { opacity: 0.55; }
.ms2w-infobox-well { position: relative; }
.ms2w-infobox-well::before {
  content: ""; position: absolute; top: 50%; left: 50%; width: 92%; height: 92%;
  transform: translate(-50%, -50%); background: url('../assets/chrome/chrome-glow.png') no-repeat center / contain;
  filter: sepia(1) saturate(4) hue-rotate(-25deg) brightness(0.95); opacity: 0.4; pointer-events: none; z-index: -1;
}
.ms2w-filter-bar { margin-bottom: 0.85rem; }
.ms2w-filter-input {
  width: min(100%, 320px);
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(201,122,43,0.28);
  color: #e0e0e0; padding: 0.45rem 0.7rem; border-radius: 4px;
}
.ms2w-card.is-hidden, tr.is-hidden { display: none !important; }
table.ms2w-sortable thead th { cursor: pointer; user-select: none; }
table.ms2w-sortable thead th[data-sort-dir="asc"]::after { content: " \25B2"; font-size: 0.7em; }
table.ms2w-sortable thead th[data-sort-dir="desc"]::after { content: " \25BC"; font-size: 0.7em; }
tr.ms2w-table-section th {
  background: rgba(201,122,43,0.14); text-align: left; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.85em;
}
ul.ms2w-level-list { margin: 0; padding-left: 1.1rem; font-size: 0.88em; }
ul.ms2w-level-list li { margin: 0.15rem 0; }
.ms2w-shell-node { margin: 1.1rem 0; padding: 0.9rem 1rem; border: 1px solid rgba(255,255,255,0.1); border-radius: 6px; background: rgba(255,255,255,0.02); }
.ms2w-shell-node .ms2w-table-icon { vertical-align: middle; margin-right: 0.5rem; }
.ms2w-shell-node table.ms2w-table { margin: 0.5rem 0 0; }
.ms2w-school-ph { display: inline-block; width: 84px; height: 84px; background: rgba(80,64,44,0.35); border-radius: 4px; }
.ms2w-card-ph { display: inline-block; width: 108px; height: 108px; background: rgba(80,64,44,0.35); border-radius: 4px; }
.ms2-hero {
  position: relative; border-radius: 6px; overflow: hidden; margin-bottom: 1.5rem;
  border: 1px solid rgba(201,122,43,0.3);
}
.ms2-hero img { width: 100%; display: block; }
.ms2-hero-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0.6rem 1rem; font-size: 0.78rem; color: #cfc4b4;
  background: linear-gradient(0deg, rgba(0,0,0,0.75), transparent);
}
.ms2-shell-tree-table td:first-child, .ms2-shell-tree-table th:first-child { white-space: nowrap; }


.ms2w-infobox-item .ms2w-infobox-stats .ms2w-infobox-label {
  overflow-wrap: normal !important; word-break: normal !important; hyphens: none !important;
}

.ms2-map-wrap { position: relative; z-index: 1; }
.ms2-map-app {
  display: flex; align-items: stretch; gap: 0;
  min-height: min(78vh, 820px); height: calc(100vh - 9.5rem);
  border: 1px solid rgba(201,122,43,0.3); border-radius: 6px; overflow: hidden;
  background: #050403;
}
.ms2-map-sidebar {
  flex: 0 0 292px; width: 292px; max-width: 100%;
  display: flex; flex-direction: column; gap: 0.45rem;
  padding: 0.6rem 0.55rem; background: rgba(10,8,6,0.96);
  border-right: 1px solid rgba(201,122,43,0.28); z-index: 1002;
  overflow: hidden;
  transition: width 0.2s ease, flex-basis 0.2s ease, padding 0.2s ease, border-color 0.2s ease, opacity 0.15s ease;
}
.ms2-map-app.is-sidebar-collapsed .ms2-map-sidebar {
  flex-basis: 0; width: 0; padding-left: 0; padding-right: 0; border-right-color: transparent;
  opacity: 0; pointer-events: none;
}
.ms2-map-sidebar-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.ms2-map-sidebar-close {
  display: none; flex: none; width: 1.85rem; height: 1.85rem; padding: 0;
  background: #14110c; color: #e9e2d3; border: 1px solid rgba(201,122,43,0.4);
  border-radius: 4px; cursor: pointer; font-size: 0.85rem; line-height: 1;
}
.ms2-map-sidebar-backdrop {
  display: none; position: absolute; inset: 0; z-index: 1095;
  border: 0; padding: 0; margin: 0; background: rgba(0,0,0,0.5); cursor: pointer;
}
.ms2-map-sidebar-title {
  margin: 0; font-size: 0.88rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ms2-ember, #c97a2b);
}
.ms2-map-search-wrap { position: relative; }
.ms2-map-search {
  width: 100%; background: #14110c; color: var(--ms2-text, #e9e2d3);
  border: 1px solid rgba(201,122,43,0.35); border-radius: 4px; padding: 0.42rem 0.55rem; font-size: 0.92rem;
}
.ms2-map-search:focus { outline: none; border-color: var(--ms2-ember, #c97a2b); }
.ms2-map-search-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; max-height: 240px; overflow-y: auto;
  background: #14110c; border: 1px solid rgba(201,122,43,0.4); border-radius: 4px; z-index: 1003;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5); display: none;
}
.ms2-map-search-results.is-open { display: block; }
.ms2-map-search-result {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.7rem; cursor: pointer;
  border-bottom: 1px solid rgba(201,122,43,0.12); font-size: 0.85rem;
}
.ms2-map-search-result:last-child { border-bottom: none; }
.ms2-map-search-result:hover, .ms2-map-search-result.is-active { background: rgba(201,122,43,0.15); }
.ms2-map-search-result .ms2-map-dot { flex: none; }
.ms2-map-search-result-main { flex: 1 1 auto; display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.ms2-map-search-result-sub { opacity: 0.65; font-size: 0.78rem; }
.ms2-map-search-result-cat {
  flex: none; font-size: 0.72rem; opacity: 0.75; border: 1px solid rgba(201,122,43,0.3); border-radius: 3px;
  padding: 0.1rem 0.4rem; white-space: nowrap;
}
.ms2-map-search-empty { padding: 0.6rem 0.7rem; font-size: 0.82rem; opacity: 0.7; }
.ms2-map-toolbar-buttons { display: flex; gap: 0.4rem; flex: none; }
.ms2-map-btn {
  background: #14110c; color: var(--ms2-text, #e9e2d3); border: 1px solid rgba(201,122,43,0.35);
  border-radius: 4px; padding: 0.36rem 0.45rem; font-size: 0.82rem; cursor: pointer; flex: 1;
}
.ms2-map-btn:hover { background: #1d1811; border-color: var(--ms2-ember, #c97a2b); }
.ms2-map-legend-stack {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 0.34rem;
  padding: 0.1rem 0 0.15rem;
}
.ms2-map-legend-group {
  border: 1px solid rgba(201,122,43,0.16); border-radius: 4px;
  background: rgba(0,0,0,0.18); padding: 0 0.22rem 0.18rem;
}
.ms2-map-legend-group > summary {
  cursor: pointer; list-style: none;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ms2-ember, #c97a2b); padding: 0.4rem 0.22rem;
}
.ms2-map-legend-group > summary::-webkit-details-marker { display: none; }
.ms2-map-legend-group > summary::before { content: "▸ "; opacity: 0.7; }
.ms2-map-legend-group[open] > summary::before { content: "▾ "; }
.ms2-map-legend {
  display: flex; flex-direction: column; gap: 0.12rem;
  font-size: 0.94rem; line-height: 1.25;
}
.ms2-map-legend-item {
  display: flex; align-items: center; gap: 0.4rem; cursor: pointer;
  padding: 0.26rem 0.3rem; border-radius: 4px;
  border: 1px solid transparent;
  color: #efe6d6;
  transition: background 0.12s ease, border-color 0.12s ease, opacity 0.12s ease, color 0.12s ease;
}
.ms2-map-legend-item input[type="checkbox"] {
  flex: none; width: 1.05rem; height: 1.05rem; margin: 0;
  accent-color: var(--ms2-ember, #c97a2b); cursor: pointer;
}
.ms2-map-legend-item:has(input:checked) {
  background: rgba(201,122,43,0.16);
  border-color: rgba(201,122,43,0.34);
}
.ms2-map-legend-item:has(input:not(:checked)) {
  background: transparent; border-color: transparent; color: #c9c0b3;
}
.ms2-map-legend-item:has(input:not(:checked)) .ms2-map-dot {
  filter: grayscale(0.55) brightness(0.85); opacity: 0.75;
}
.ms2-map-legend-item:has(input:not(:checked)) .ms2-map-legend-label { color: #d2c9bc; }
.ms2-map-legend-item:has(input:not(:checked)) .ms2-map-legend-count { opacity: 0.7; color: #b4aa9d; }
.ms2-map-legend-item:hover { background: rgba(201,122,43,0.2); border-color: rgba(201,122,43,0.4); }
.ms2-map-legend-item:has(input:not(:checked)):hover {
  background: rgba(201,122,43,0.1); border-color: rgba(201,122,43,0.22); color: #e6ddcd;
}
.ms2-map-legend-label { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms2-map-legend-count { opacity: 0.62; margin-left: auto; font-size: 0.86em; font-variant-numeric: tabular-nums; }
.ms2-map-dot {
  display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px;
  border-radius: 50%; border: 1px solid rgba(0,0,0,0.4); font-size: 8px; line-height: 1; overflow: hidden;
  flex: none;
}
.ms2-map-stage { position: relative; flex: 1 1 auto; min-width: 0; min-height: 320px; }
.ms2-map-canvas {
  width: 100%; height: 100%; min-height: 320px;
  background: #050403; border: 0; border-radius: 0;
}
.ms2-map-controls {
  position: absolute; top: 0.75rem; right: 0.75rem; z-index: 1001;
  display: flex; gap: 0.4rem;
}
.ms2-map-control-btn, .ms2-map-side-toggle {
  background: rgba(12,10,8,0.92); color: #e9e2d3; border: 1px solid rgba(201,122,43,0.45);
  border-radius: 4px; width: 2.4rem; height: 2.4rem; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.05rem; line-height: 1; cursor: pointer;
}
.ms2-map-control-btn:hover, .ms2-map-side-toggle:hover {
  border-color: var(--ms2-ember, #c97a2b); background: rgba(20,16,12,0.96);
}
.ms2-map-control-btn svg, .ms2-map-side-toggle svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; }

.ms2-map-side-toggle { position: absolute; z-index: 1001; top: 4.9rem; left: 0.75rem; }
.ms2-map-app:fullscreen, .ms2-map-app:-webkit-full-screen {
  width: 100%; height: 100%; border-radius: 0; border: none; background: #050403;
}
.ms2-map-canvas.leaflet-container { background: #0a0806; }
.ms2-map-canvas .leaflet-control-zoom { margin-top: 0.75rem; margin-left: 0.75rem; }
.ms2-map-canvas .leaflet-control-zoom a { background: #14110c; color: #e9e2d3; border-color: rgba(201,122,43,0.3); }
.ms2-map-canvas .leaflet-control-zoom a:hover { background: #1d1811; }
.ms2-map-note { margin-top: 0.75rem; }
.ms2-map-canvas .leaflet-popup-content-wrapper, .ms2-map-canvas .leaflet-popup-tip {
  background: #14110c; color: #e9e2d3; border: 1px solid rgba(201,122,43,0.4);
}
.ms2-map-canvas .leaflet-popup-content a { color: var(--ms2-ember, #c97a2b); }
.ms2-map-note { font-size: 0.82rem; color: var(--ms2-muted, #8f867a); margin-top: 0.85rem; }
.ms2w-main:has(.ms2-map-wrap) { width: 100%; max-width: 1480px; min-width: 0; }


.ms2-map-canvas .ms2-map-divicon,
.ms2-map-canvas .leaflet-div-icon.ms2-map-divicon {
  background: none !important; border: none !important;
  width: 30px !important; height: 30px !important;
  overflow: hidden !important; margin: 0 !important;
}
.ms2-map-pin {
  width: 30px; height: 30px; max-width: 30px; max-height: 30px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(0,0,0,0.55); box-shadow: 0 1px 4px rgba(0,0,0,0.6); overflow: hidden;
  box-sizing: border-box;
}
.ms2-map-pin img {
  width: 22px; height: 22px; max-width: 22px; max-height: 22px;
  min-width: 0; min-height: 0; flex: 0 0 22px;
  object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.6));
}
.ms2-map-pin-glyph { font-size: 15px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.6)); }
.ms2-map-pin.is-offmap { opacity: 0.6; border-style: dashed; }
.ms2-map-pin { position: relative; }
.ms2-map-pin.is-done { box-shadow: 0 0 0 2px #2ecc71, 0 1px 4px rgba(0,0,0,0.6); }
.ms2-map-pin.is-done::after {
  content: "✓"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #2ecc71; font-size: 17px; font-weight: 800; line-height: 1;
  text-shadow: 0 0 3px #0b0906, 0 1px 2px rgba(0,0,0,0.95), 0 0 1px #0b0906;
  pointer-events: none;
}
.ms2-map-done-toggle {
  display: flex; align-items: center; gap: 0.35rem; margin: 0.25rem 0 0.15rem;
  font-size: 0.72rem; cursor: pointer; user-select: none;
}
.ms2-map-done-toggle input { accent-color: #2ecc71; width: 0.85rem; height: 0.85rem; }
.ms2-map-progress-row {
  display: flex; flex-direction: column; gap: 0.25rem; padding: 0.1rem 0 0.2rem;
  border-top: 1px solid rgba(201,122,43,0.18); border-bottom: 1px solid rgba(201,122,43,0.18);
}
.ms2-map-progress-row label { display: flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; cursor: pointer; }
.ms2-map-search-result.is-done strong::after { content: " ✓"; color: #2ecc71; }


.ms2-map-canvas .ms2-map-tooltip {
  background: rgba(11,9,6,0.88); color: #e9e2d3; border: 1px solid rgba(201,122,43,0.5);
  border-radius: 3px; font-size: 0.72rem; font-weight: 600; padding: 0.12rem 0.4rem; white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.ms2-map-canvas .ms2-map-tooltip::before { border-right-color: rgba(201,122,43,0.5); }
.ms2-map-popup-item {
  display: block; font-size: 0.8rem; font-weight: 600; color: var(--ms2-ember, #c97a2b);
  border-bottom: none; padding-left: 0.9rem; position: relative;
}
.ms2-map-popup-item::before { content: "•"; position: absolute; left: 0; opacity: 0.75; }


.ms2-map-popup-wrap .leaflet-popup-content { margin: 0.7rem 0.8rem; }
.ms2-map-popup { font-size: 0.85rem; }
.ms2-map-popup-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.4rem; }
.ms2-map-popup-icon {
  width: 40px; height: 40px; object-fit: contain; flex: none; border-radius: 4px;
  background: rgba(255,255,255,0.06); padding: 3px;
}
.ms2-map-popup-headtext { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.ms2-map-popup-headtext strong { font-size: 0.98rem; }
.ms2-map-popup-meta { font-size: 0.78rem; opacity: 0.7; font-style: italic; }
.ms2-map-popup-cat {
  display: inline-block; font-size: 0.7rem; color: #0b0906; font-weight: 600; border-radius: 3px;
  padding: 0.1rem 0.45rem; margin-bottom: 0.45rem;
}
.ms2-map-popup-desc { margin: 0 0 0.45rem; opacity: 0.9; line-height: 1.35; }
.ms2-map-popup-note { margin: 0 0 0.45rem; opacity: 0.65; font-size: 0.8rem; }

.ms2-map-popup-related { margin: 0 0 0.5rem; display: flex; flex-direction: column; gap: 0.25rem; }
.ms2-map-popup-related-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.03em; opacity: 0.6; }
.ms2-map-popup-related-link {
  display: block; font-size: 0.8rem; font-weight: 600; color: var(--ms2-ember, #c97a2b);
  border-bottom: none; padding-left: 0.9rem; position: relative;
}

.ms2-map-popup-related-link::before { content: "•"; position: absolute; left: 0; opacity: 0.75; }
.ms2-map-popup-link {
  display: inline-block; font-weight: 600; color: var(--ms2-ember, #c97a2b);
}
.ms2-node-levels { font-size: 0.82rem; color: var(--ms2-muted, #8f867a); }
.ms2w-muted { color: var(--ms2-muted, #8f867a); font-weight: 400; font-size: 0.8em; }
.ms2w-status-icon { vertical-align: middle; margin-right: 0.5rem; border-radius: 4px; }
.ms2w-infobox-body { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
@media (max-width: 900px) {
  .ms2w-infobox { max-width: 100%; }
  .ms2w-top { flex-wrap: wrap; gap: 0.55rem; padding: 0.55rem 0.7rem; max-width: 100%; }
  .ms2w-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .ms2w-search-wrap {
    order: 3; width: 100%; max-width: none; min-width: 0; margin-left: 0; flex: 1 1 100%;
  }
  .ms2w-nav {
    display: none; order: 4; width: 100%; padding-bottom: 0.25rem;
  }
  .ms2w-nav.is-open { display: block; }
  .ms2w-nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .ms2w-nav-item > a {
    width: 100%; padding: 0.65rem 0.35rem; border-bottom: 1px solid rgba(201,122,43,0.12);
  }
  .ms2w-nav-menu { display: none !important; }
  .ms2w-nav-caret { display: none; }
  .ms2w-nav-item > a { padding: 0.55rem 0.25rem; }
  .ms2w-main { padding: 0.85rem 0.75rem 2.5rem; }
  .ms2w-main:has(.ms2-map-wrap) { padding-left: 0.45rem; padding-right: 0.45rem; }
  .ms2w-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ms2w-hub-grid, .ms2w-item-grid, .ms2w-school-grid,
  .ms2w-hub-columns, .ms2w-cat-grid, .ms2w-card-grid, .ms2w-gallery {
    grid-template-columns: 1fr;
  }
  .ms2w-school-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ms2w-card { min-width: 0; max-width: 100%; }
  .ms2w-card-icon-link { width: 64px; max-width: 28%; }
  .ms2w-card-icon, .ms2w-card-ph { max-width: 64px; width: 64px; height: 64px; }
  .content img { max-width: 100%; height: auto; }
  .content .ms2-map-pin img {
    width: 22px; height: 22px; max-width: 22px; max-height: 22px;
  }
  .content .ms2w-card-icon {
    max-width: 64px; width: 64px; height: 64px;
  }
  .content .ms2w-hub-tile-icon, .content .ms2w-school-icon, .content .ms2w-cat-icon {
    max-width: 64px; width: min(64px, 100%); height: auto;
  }
  .ms2-map-app {
    position: relative; flex-direction: column;
    height: calc(100vh - 7.2rem); min-height: 520px;
  }
  .ms2-map-sidebar {
    position: absolute; inset: 0 auto 0 0; width: min(88vw, 300px); max-width: 300px;
    flex-basis: auto; opacity: 1; pointer-events: auto;
    transform: translateX(-105%); transition: transform 0.2s ease; z-index: 1100;
    box-shadow: 8px 0 24px rgba(0,0,0,0.45);
  }
  .ms2-map-app.is-sidebar-collapsed .ms2-map-sidebar {
    width: min(88vw, 300px); padding: 0.6rem 0.55rem; border-right: 1px solid rgba(201,122,43,0.28);
    opacity: 1; pointer-events: none; transform: translateX(-105%);
  }
  .ms2-map-app.is-sidebar-open .ms2-map-sidebar {
    transform: translateX(0); pointer-events: auto;
  }
  .ms2-map-sidebar-close { display: inline-flex; align-items: center; justify-content: center; }
  .ms2-map-app.is-sidebar-open .ms2-map-sidebar-backdrop { display: block; }
  .ms2-map-side-toggle { z-index: 1205; }
  .ms2-map-app.is-sidebar-open .ms2-map-side-toggle {
    left: calc(min(88vw, 300px) + 0.35rem);
  }
  .ms2-map-stage { flex: 1 1 auto; min-height: 0; }
  .ms2-map-canvas .leaflet-control-zoom { margin-top: 0.75rem; }
}
@media (max-width: 560px) {
  .ms2w-hub-grid, .ms2w-item-grid, .ms2w-school-grid { grid-template-columns: 1fr; }
  .ms2w-logo-img { height: 32px; }
  table.ms2w-table { font-size: 0.88rem; }
  table.ms2w-table th, table.ms2w-table td { padding: 0.4rem 0.5rem; }
  .ms2w-card { gap: 0.7rem; padding: 0.75rem; }
}
@media (hover: none) {
  .ms2w-hub-tile:hover, .ms2w-cat:hover, .ms2w-school-tile:hover, .ms2w-card:hover {
    transform: none;
  }
}
@media (max-width: 900px) {
  html, body { width: 100%; overflow-x: scroll; }
  .ms2w-main-row, .ms2w-main, .content, article, #ms2w-page, #ms2w-content,
  .ms2w-article-body, .ms2w-article, .ms2w-article--item, .ms2w-item-body,
  .ms2w-heading-danger, .ms2w-filter, .ms2w-card-grid, .ms2w-cat-grid, .ms2w-hub-columns,
  .ms2w-school-grid, .ms2w-gallery, .ms2w-hub-wrap {
    max-width: 100%; min-width: 0; box-sizing: border-box;
  }
  .ms2w-main { padding: 0.45rem 0.35rem 1.6rem; }
  #ms2w-page { padding: 8px; overflow-x: scroll; overflow-y: visible; }
  .ms2w-frame-top, .ms2w-frame-bottom {
    left: 8px; right: 8px; height: 8px; background-size: auto 8px;
  }
  .ms2w-frame-left, .ms2w-frame-right {
    top: 8px; bottom: 8px; width: 8px; background-size: 8px auto;
  }
  #ms2w-content {
    padding: 0.65rem 0.55rem 1rem; overflow-x: scroll; overflow-wrap: anywhere;
  }
  h1 { font-size: 1.35rem; overflow-wrap: anywhere; }
  h2.ms2w-h2, h3 { overflow-wrap: anywhere; }
  h2.ms2w-h2 { font-size: 1.15rem; }
  p, li, td, th, .ms2w-card-title, .ms2w-card-summary, .ms2w-card-meta,
  .ms2w-cat-head p, .ms2w-hub-tile-label, .ms2w-school-label,
  .ms2w-crumbs, .ms2w-hub-subtitle, .ms2w-hub-lead {
    overflow-wrap: anywhere; word-break: break-word; min-width: 0;
  }
  .ms2w-card-grid, .ms2w-cat-grid, .ms2w-hub-columns, .ms2w-gallery,
  .ms2w-hub-grid, .ms2w-item-grid {
    grid-template-columns: minmax(0, 1fr) !important; width: 100%;
  }
  .ms2w-school-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; width: 100%; }
  .ms2w-card, .ms2w-cat, .ms2w-hub-tile, .ms2w-school-tile {
    width: 100%; max-width: 100%; min-width: 0; overflow: hidden; box-sizing: border-box;
  }
  .ms2w-card-body { min-width: 0; flex: 1 1 auto; }
  .ms2w-table-wrap, .ms2w-table-wrap.table-responsive {
    display: block; width: 100%; max-width: 100%; min-width: 0;
    overflow-x: scroll; -webkit-overflow-scrolling: touch; contain: inline-size;
  }
  table.ms2w-table {
    width: max-content; min-width: 36rem; max-width: none; table-layout: auto;
  }
  table.ms2w-table th, table.ms2w-table td {
    white-space: nowrap;
  }
  .ms2w-table-icon { width: 40px; min-width: 40px; }
  .ms2w-infobox { width: 100% !important; max-width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
  .ms2w-infobox-item .ms2w-infobox-stats .ms2w-infobox-label {
    overflow-wrap: anywhere !important; word-break: break-word !important;
  }
  .ms2-shell-tree-table td:first-child, .ms2-shell-tree-table th:first-child { white-space: normal; }
  .ms2w-top { max-width: 100%; min-width: 0; }
  .ms2w-search-wrap { max-width: 100%; min-width: 0; }
}
@media (max-width: 560px) {
  .ms2w-school-grid { grid-template-columns: minmax(0, 1fr) !important; }
}
html, body, #ms2w-page, #ms2w-content {
  overflow-x: scroll !important;
}
