* {
  box-sizing: border-box;
}
:root {
  --ink: #183e36;
  --text: #2f453f;
  --muted: #81918b;
  --green: #0b715b;
  --green-dark: #075643;
  --soft: #eaf3ee;
  --line: #e4eae6;
  --paper: #fff;
  --background: #f5f7f5;
  --red: #ad3e3e;
  --shadow: 0 4px 24px #1d3d3006;
}
html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background: var(--background);
  font:
    14px/1.55 'Segoe UI',
    'Microsoft YaHei',
    'PingFang SC',
    system-ui,
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  transition:
    background 0.16s,
    color 0.16s,
    box-shadow 0.16s;
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #7cbba8;
  outline-offset: 3px;
}
button svg,
span[data-icon] svg,
div[data-icon] svg {
  width: 18px;
  height: 18px;
  display: block;
}
button {
  color: inherit;
}
h1,
h2,
h3,
p {
  margin: 0;
}
[hidden] {
  display: none !important;
}
a {
  color: var(--green);
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 196px;
  background: #fcfdfc;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 29px 18px 22px;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 2px 10px 37px;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 0.18em;
  margin-top: 1px;
  color: #789385;
}
.brand-symbol {
  color: #fff;
  background: var(--ink);
  border-radius: 12px;
  padding: 8px;
}
.brand-symbol svg {
  width: 24px !important;
  height: 24px !important;
}
.nav-caption {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #94a198;
  padding: 0 13px 11px;
}
.main-nav {
  display: grid;
  gap: 7px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 12px 13px;
  border-radius: 10px;
  color: #6b7c74;
  font-size: 13px;
  white-space: nowrap;
}
.nav-link:hover {
  background: #f0f5f1;
}
.nav-link.active {
  background: #e8f1eb;
  color: var(--green);
  font-weight: 600;
}
.nav-count {
  margin-left: auto;
  background: #d7e7de;
  color: #33715b;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 5px;
}
.sidebar-bottom {
  margin-top: auto;
}
.local-badge {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 0 12px;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #5b9b75;
  border-radius: 50%;
  flex: 0 0 auto;
}
.sidebar-bottom > p {
  padding: 6px 12px 15px;
  font-size: 10px;
  color: #95a199;
}
.quiet {
  font-size: 12px;
  padding: 9px 12px;
}
.team-mark {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 23px 9px 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  color: #536d5e;
}
.team-mark img {
  width: 33px;
  height: 33px;
  object-fit: contain;
}
.team-mark small {
  display: block;
  font-size: 7px;
  letter-spacing: 0.04em;
  font-weight: 400;
  color: #99a49d;
}
.workspace {
  margin-left: 196px;
}
.topbar {
  height: 78px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: #fcfdfc;
  gap: 18px;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: #94a198;
}
.breadcrumb strong {
  font-weight: 500;
  color: #53685b;
}
.crumb-divider {
  color: #bcc7c0;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 17px;
}
.save-status {
  font-size: 11px;
  color: #7a8d80;
  display: flex;
  gap: 7px;
  align-items: center;
  white-space: nowrap;
}
.save-status.error {
  color: var(--red);
}
.save-status.error .status-dot {
  background: var(--red);
}
.language-btn {
  border: 1px solid var(--line);
  background: white;
  border-radius: 7px;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 600;
}
.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  font-weight: 500;
  font-size: 12px;
  line-height: 1.45;
  min-height: 38px;
}
.btn.primary {
  background: var(--green);
  color: white;
}
.btn.primary:hover {
  background: var(--green-dark);
}
.btn.secondary {
  background: #fff;
  border-color: #d9e4dd;
  color: #395d4a;
}
.btn.secondary:hover {
  background: #f4f8f5;
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: #688172;
}
.btn.ghost:hover {
  background: #edf4ef;
}
.btn.danger {
  color: var(--red);
}
.btn.small {
  font-size: 11px;
  padding: 7px 11px;
  min-height: 32px;
}
.btn.small svg {
  width: 15px;
  height: 15px;
}
.page-content {
  padding: 29px 30px 0;
  max-width: 2080px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  margin-bottom: 25px;
}
.eyebrow {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #7f9c8c;
  margin-bottom: 9px;
}
.page-heading h1 {
  font-size: clamp(22px, 1.85vw, 30px);
  letter-spacing: -0.025em;
  line-height: 1.3;
  font-weight: 650;
  color: var(--ink);
}
.page-subtitle {
  font-size: 11px;
  color: #8c9b91;
  margin-top: 9px;
}
.summary-stats {
  display: flex;
  gap: 28px;
  padding-right: 5px;
}
.summary-stats > div {
  min-width: 63px;
}
.summary-stats strong {
  display: block;
  font-size: 27px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.06em;
  color: var(--ink);
}
.summary-stats span {
  display: block;
  font-size: 10px;
  color: #91a094;
  margin-top: 3px;
  white-space: nowrap;
}
.map-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  height: calc(100vh - 263px);
  min-height: 435px;
  max-height: 1000px;
}
.map-card,
.explorer-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.map-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.map-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 19px;
  min-height: 63px;
  border-bottom: 1px solid #edf1ed;
}
.section-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: #3e5b49;
}
.tiny-orbit {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #59a088;
  box-shadow: 0 0 0 4px #edf5ef;
  margin-right: 3px;
}
.pill {
  font-size: 9px;
  background: #f0f5f1;
  color: #7b9281;
  padding: 2px 7px;
  border-radius: 5px;
  font-weight: 400;
}
.map-viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #e8eef0;
  touch-action: none;
  cursor: grab;
  background-image: radial-gradient(#b8cdd066 0.6px, transparent 0.6px);
  background-size: 10px 10px;
}
.map-viewport.dragging {
  cursor: grabbing;
}
.map-plane {
  position: absolute;
  transform-origin: 0 0;
  will-change: transform;
  aspect-ratio: 16/9;
}
.world-image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: fill;
  inset: 0;
  pointer-events: none;
  user-select: none;
}
.map-plane svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.route-line {
  stroke: #157963;
  stroke-width: 2.5;
  fill: none;
  stroke-dasharray: 7 8;
  opacity: 0.6;
}
.marker {
  position: absolute;
  border: 0;
  padding: 0;
  background: none;
  transform: translate(-50%, -50%) scale(var(--inverse, 1));
  transform-origin: center;
  display: grid;
  place-items: center;
  z-index: 3;
  cursor: pointer;
}
.marker-core {
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #0d7662;
  color: white;
  border: 2px solid #fff;
  font:
    600 10px/1 'Segoe UI',
    sans-serif;
  box-shadow: 0 2px 9px #11504128;
  transition: 0.16s;
}
.marker:hover,
.marker.active {
  z-index: 8;
}
.marker:hover .marker-core,
.marker.active .marker-core {
  background: #e0a256;
  border-color: white;
  box-shadow:
    0 0 0 5px #e0a25633,
    0 3px 8px #5d410d33;
}
.marker.home .marker-core {
  background: white;
  min-width: 36px;
  height: 36px;
  padding: 4px;
  border: 2px solid #0d7662;
  box-shadow: 0 0 0 4px #0d76621c;
}
.marker-core img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.marker-label {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 6px;
  background: white;
  box-shadow: 0 2px 10px #173e3022;
  font-size: 10px;
  color: #355c47;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.marker:hover .marker-label,
.marker.active .marker-label,
.marker.home .marker-label {
  opacity: 1;
}
.marker.filtered {
  opacity: 0.15;
  pointer-events: none;
}
.zoom-controls {
  position: absolute;
  right: 15px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 0;
  z-index: 12;
  background: white;
  box-shadow: 0 3px 15px #18382c12;
  border: 1px solid #dce5dd;
  border-radius: 8px;
  overflow: hidden;
  cursor: default;
}
.zoom-controls button {
  border: 0;
  background: #fff;
  width: 30px;
  height: 33px;
  font-size: 18px;
  color: #547960;
}
.zoom-controls button:hover {
  background: #edf5ef;
}
.zoom-controls span {
  font-size: 9px;
  width: 39px;
  text-align: center;
  color: #76917f;
}
.map-hint {
  position: absolute;
  bottom: 23px;
  left: 17px;
  color: #667f74;
  font-size: 9px;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  background: #ffffffbe;
  padding: 5px 9px;
  border-radius: 6px;
}
.map-hint svg {
  width: 13px !important;
  height: 13px !important;
}
.map-footer {
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 9px;
  color: #8a9c8e;
  border-top: 1px solid #eaf0e9;
  flex-wrap: wrap;
}
.map-footer > span:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend-dot {
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
}
.map-provenance {
  font-size: 8px;
}
.explorer-card {
  display: flex;
  flex-direction: column;
  padding: 19px 16px 0;
  min-height: 0;
}
.explorer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 23px;
  margin-bottom: 15px;
}
.search-box {
  position: relative;
  border: 1px solid #e0e8e1;
  background: #f8faf8;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  height: 38px;
  color: #93a396;
  flex-shrink: 0;
}
.search-box svg {
  width: 15px !important;
  height: 15px !important;
}
.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #3a5b47;
  font-size: 11px;
  outline: none;
  padding: 8px 0;
}
.search-box:focus-within {
  outline: 2px solid #9fc4ac;
  border-color: transparent;
}
.search-box input:focus-visible {
  outline: none;
}
.search-box input::placeholder {
  color: #9faea1;
}
.explorer-summary {
  font-size: 10px;
  color: #99a89a;
  padding: 15px 2px 10px;
}
.explorer-list {
  flex: 1;
  overflow: auto;
  padding-bottom: 12px;
  min-height: 0;
}
.country-row,
.person-row {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  text-align: left;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 8px;
  margin: 2px 0;
}
.country-row:hover,
.person-row:hover {
  background: #f0f6f0;
}
.country-number {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #edf4ee;
  color: #7a9985;
  font-size: 9px;
  flex: 0 0 auto;
}
.country-row .row-main {
  flex: 1;
  min-width: 0;
}
.row-main strong {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #40634e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-main small {
  display: block;
  font-size: 9px;
  color: #a0aea1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-count {
  font-size: 10px;
  color: #9aaa9b;
  margin-left: auto;
}
.row-chevron {
  width: 12px !important;
  height: 12px !important;
  color: #a6b5a8;
}
.avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #eaf1ea;
  color: #73927d;
  display: grid;
  place-items: center;
  font: 500 12px/1 system-ui;
  overflow: hidden;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar.large {
  width: 70px;
  height: 70px;
  border-radius: 16px;
  font-size: 24px;
}
.avatar.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  font-size: 28px;
}
.icon-btn {
  border: 0;
  background: transparent;
  border-radius: 7px;
  min-width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  padding: 5px;
  color: #7a9481;
  flex-shrink: 0;
}
.icon-btn:hover {
  background: #eef5ee;
}
.icon-btn svg {
  width: 17px;
  height: 17px;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  color: #a0ada2;
  font-size: 9px;
  padding: 16px 2px 18px;
  gap: 15px;
}
.version {
  margin-left: 6px;
  color: #b1bcb3;
}
.directory-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.search-box.wide {
  width: 390px;
  max-width: 50%;
  height: 41px;
  background: white;
}
.select-wrap select {
  height: 41px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 0 32px 0 12px;
  color: #68826f;
  font-size: 11px;
  max-width: 215px;
}
.result-count {
  margin-left: auto;
  font-size: 11px;
  color: #8b9d8c;
}
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 15px;
}
.person-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  padding: 21px;
  cursor: pointer;
  min-height: 205px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  text-align: left;
  box-shadow: var(--shadow);
}
.person-card:hover {
  border-color: #a8c7b1;
  box-shadow: 0 4px 18px #1d3d3010;
}
.person-card-head {
  display: flex;
  align-items: center;
  gap: 11px;
}
.person-card .avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
}
.person-card h3 {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: #2d5740;
}
.person-card small {
  display: block;
  color: #96a496;
  font-size: 9px;
  margin-top: 3px;
}
.person-snippet {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #8b998d;
  font-size: 11px;
  line-height: 1.8;
  min-height: 40px;
}
.person-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
  color: #98aa99;
  margin-top: auto;
}
.person-card-bottom svg {
  width: 14px;
  height: 14px;
  color: #789985;
}
.contact-chip {
  background: #eef6ef;
  color: #699879;
  border-radius: 5px;
  padding: 3px 6px;
}
.empty-state {
  padding: 45px 12px;
  text-align: center;
  font-size: 12px;
  line-height: 1.8;
  color: #91a094;
  grid-column: 1/-1;
}
.management-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 23px;
}
.management-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 23px;
}
.card-icon {
  color: #448567;
  background: #edf5ef;
  padding: 10px;
  border-radius: 10px;
  display: inline-flex;
  margin-bottom: 15px;
}
.card-icon.muted {
  background: #f3f1e8;
  color: #aa986b;
}
.management-card h2,
.node-management h2 {
  font-size: 16px;
  font-weight: 600;
  color: #3b5a45;
  margin-bottom: 9px;
}
.management-card > p,
.node-header p {
  color: #91a093;
  font-size: 11px;
  line-height: 1.85;
}
.button-row {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.data-location {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 15px;
  border-top: 1px solid #edf1ec;
}
.data-location small {
  font-size: 9px;
  color: #a0ada1;
}
.data-location code {
  font:
    10px/1.7 'Consolas',
    monospace;
  color: #718a76;
  overflow-wrap: anywhere;
}
.callout {
  background: #f5f7f3;
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 10px !important;
}
.node-management {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  overflow: hidden;
}
.node-header {
  padding: 22px 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.node-header h2 {
  margin-bottom: 4px;
}
.table-scroll {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
  text-align: left;
}
th {
  color: #8d9e8f;
  background: #f8faf7;
  font-weight: 500;
  font-size: 10px;
  padding: 12px 23px;
  border-top: 1px solid #edf2ec;
  border-bottom: 1px solid #edf2ec;
  white-space: nowrap;
}
td {
  padding: 12px 23px;
  border-bottom: 1px solid #f0f3ed;
  color: #7c917e;
}
tr:last-child td {
  border-bottom: 0;
}
td strong {
  font-weight: 500;
  color: #526f55;
  display: block;
}
td small {
  font-size: 9px;
  color: #a0afa1;
  display: block;
}
td:last-child {
  text-align: right;
}
dialog {
  border: 1px solid #e4eae4;
  border-radius: 18px;
  padding: 0;
  background: white;
  color: var(--text);
  box-shadow: 0 25px 100px #12372633;
  max-height: calc(100dvh - 40px);
  max-width: calc(100vw - 30px);
}
dialog::backdrop {
  background: #18372e55;
  backdrop-filter: blur(3px);
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 22px 25px 17px;
  border-bottom: 1px solid #edf1ec;
}
.dialog-top .eyebrow {
  margin-bottom: 5px;
}
.dialog-top > span.eyebrow {
  margin: 0;
}
.dialog-top h2 {
  font-size: 20px;
  font-weight: 600;
  color: #31533d;
}
.dialog-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  justify-content: flex-end;
  padding: 17px 25px;
  border-top: 1px solid #edf1ec;
  background: #fcfdfb;
  border-radius: 0 0 18px 18px;
}
.dialog-body {
  padding: 23px 25px;
  overflow: auto;
}
.profile-dialog {
  width: 580px;
}
.profile-hero {
  display: flex;
  align-items: center;
  gap: 19px;
  padding: 25px;
}
.profile-hero h2 {
  font-size: 24px;
  line-height: 1.3;
  color: #284e38;
  margin-bottom: 8px;
}
.profile-hero .tag {
  display: inline-block;
  padding: 3px 8px;
  background: #edf4ed;
  border-radius: 5px;
  color: #6e8b72;
  font-size: 10px;
  margin: 2px 4px 2px 0;
}
.profile-hero p {
  font-size: 11px;
  color: #9aaa9a;
  margin-top: 7px;
}
.profile-body {
  padding: 0 25px 25px;
  overflow: auto;
  max-height: calc(100dvh - 360px);
  min-height: 90px;
}
.profile-description {
  font-size: 12px;
  line-height: 1.9;
  color: #6f8575;
  white-space: pre-wrap;
  background: #f6f9f4;
  padding: 17px 19px;
  border-radius: 10px;
  overflow-wrap: anywhere;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-top: 20px;
}
.contact-field {
  padding: 13px 0;
  border-bottom: 1px solid #edf1eb;
  min-width: 0;
}
.contact-field small {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: #9aad9b;
  margin-bottom: 5px;
}
.contact-field a,
.contact-field span {
  font-size: 11px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  text-decoration: none;
}
.contact-field a:hover {
  text-decoration: underline;
}
.profile-notes {
  margin-top: 17px;
  font-size: 11px;
  line-height: 1.85;
  white-space: pre-wrap;
  color: #809481;
}
.editor-dialog {
  width: 680px;
}
.editor-dialog form {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 42px);
}
.editor-dialog .dialog-body {
  flex: 1;
  min-height: 0;
}
.editor-dialog label {
  display: block;
  font-size: 11px;
  color: #6e8976;
  margin-bottom: 16px;
}
.editor-dialog label > span {
  display: block;
  margin-bottom: 7px;
}
.editor-dialog input:not([type='checkbox']):not([type='file']),
.editor-dialog textarea {
  width: 100%;
  border: 1px solid #dae5da;
  border-radius: 7px;
  background: #fcfdfb;
  padding: 9px 11px;
  font-size: 12px;
  color: #365340;
  resize: vertical;
}
.editor-dialog input:focus,
.editor-dialog textarea:focus {
  background: white;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 17px;
}
.portrait-editor {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 23px;
}
.field-hint {
  font-size: 10px;
  color: #9bab9c;
  line-height: 1.7;
  margin: 8px 0 12px;
}
.portrait-editor .field-hint {
  margin-bottom: 0;
}
.country-checkboxes {
  border: 1px solid #e1e9df;
  border-radius: 9px;
  margin: 0 0 18px;
  padding: 10px 12px;
}
.country-checkboxes legend {
  font-size: 11px;
  color: #6e8976;
  padding: 0 6px;
}
.country-checkboxes > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  max-height: 133px;
  overflow: auto;
}
.country-checkboxes label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 5px 2px;
  font-size: 10px;
  cursor: pointer;
}
.country-checkboxes input {
  accent-color: var(--green);
  margin: 0;
}
.country-checkboxes label > span {
  margin: 0;
}
.form-error {
  color: var(--red);
  font-size: 11px;
  line-height: 1.7;
  margin-top: 2px;
}
.spacer {
  flex: 1;
}
.node-dialog {
  width: 635px;
}
.position-picker {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 9px;
  overflow: hidden;
  cursor: crosshair;
  border: 1px solid #dae5dd;
}
.position-picker img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}
.position-picker > span {
  position: absolute;
  width: 13px;
  height: 13px;
  background: #e6a055;
  border: 2px solid white;
  box-shadow: 0 0 0 3px #b56e2840;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.coordinates {
  margin-top: 16px;
}
.coordinates label {
  margin-bottom: 0;
}
.help-dialog {
  width: 590px;
}
.help-dialog .dialog-body {
  max-height: calc(100dvh - 210px);
  font-size: 12px;
  color: #718876;
  line-height: 1.9;
}
.help-dialog h3 {
  font-size: 13px;
  color: #31533d;
  margin: 15px 0 6px;
}
.help-dialog h3:first-child {
  margin-top: 0;
}
.help-dialog ol {
  padding-left: 20px;
  margin: 5px 0 15px;
}
.help-dialog code {
  font-size: 11px;
  background: #edf3eb;
  padding: 2px 4px;
  border-radius: 3px;
  overflow-wrap: anywhere;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 27px;
  transform: translateX(-50%);
  background: #234d39;
  color: #f1f7f2;
  padding: 13px 22px;
  border-radius: 10px;
  box-shadow: 0 10px 40px #193e3833;
  font-size: 12px;
  max-width: calc(100vw - 30px);
  z-index: 5000;
}
.toast.error {
  background: #8f3e3e;
}
.fatal-error {
  border: 1px solid #e3c2b9;
  background: #fff4ef;
  color: #954e43;
  padding: 18px 22px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 13px;
  white-space: pre-wrap;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-thumb {
  background: #d8e2d7;
  border-radius: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
@media (min-width: 1700px) {
  .sidebar {
    width: 220px;
    padding-left: 22px;
    padding-right: 22px;
  }
  .workspace {
    margin-left: 220px;
  }
  .page-content {
    padding: 34px 38px 0;
  }
  .topbar {
    padding: 0 38px;
  }
  .map-view {
    grid-template-columns: minmax(0, 1fr) 315px;
    height: calc(100vh - 278px);
  }
  .explorer-card {
    padding: 22px 21px 0;
  }
  .country-row,
  .person-row {
    padding: 12px 9px;
  }
  .row-main strong {
    font-size: 12px;
  }
  .page-heading {
    margin-bottom: 29px;
  }
  .summary-stats {
    gap: 37px;
  }
  .summary-stats strong {
    font-size: 33px;
  }
}
@media (max-width: 1180px) {
  .sidebar {
    width: 166px;
    padding-left: 10px;
    padding-right: 10px;
  }
  .workspace {
    margin-left: 166px;
  }
  .brand {
    font-size: 18px;
    gap: 7px;
    padding-left: 8px;
  }
  .brand-symbol {
    padding: 7px;
  }
  .brand-symbol svg {
    width: 20px !important;
    height: 20px !important;
  }
  .topbar {
    padding: 0 22px;
  }
  .page-content {
    padding: 24px 22px 0;
  }
  .topbar-actions {
    gap: 10px;
  }
  .save-status {
    font-size: 10px;
  }
  .map-view {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 13px;
    height: calc(100vh - 251px);
  }
  .summary-stats {
    gap: 18px;
  }
  .summary-stats > div {
    min-width: 50px;
  }
  .summary-stats strong {
    font-size: 24px;
  }
  .summary-stats span {
    font-size: 9px;
  }
  .page-subtitle {
    max-width: 380px;
  }
  .page-heading {
    gap: 20px;
  }
  .map-provenance {
    display: none;
  }
  .map-hint {
    font-size: 8px;
    left: 10px;
    bottom: 18px;
    max-width: calc(100% - 115px);
  }
  .map-toolbar {
    padding: 13px 14px;
  }
  .explorer-card {
    padding: 16px 13px 0;
  }
  .map-toolbar .pill {
    display: none;
  }
  .management-card {
    padding: 19px;
  }
}
@media (max-width: 930px) {
  .sidebar {
    width: 68px;
    padding: 25px 9px 18px;
  }
  .workspace {
    margin-left: 68px;
  }
  .brand {
    padding: 0 5px 35px;
  }
  .brand > span:last-child,
  .nav-caption,
  .nav-link > span:not([data-icon]),
  .nav-count,
  .sidebar-bottom > p,
  .local-badge,
  .team-mark {
    display: none;
  }
  .nav-link {
    justify-content: center;
    padding: 13px 8px;
  }
  .topbar {
    height: 66px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 22px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .summary-stats {
    gap: 15px;
  }
  .page-subtitle {
    font-size: 10px;
  }
  .map-view {
    height: calc(100vh - 245px);
    grid-template-columns: minmax(0, 1fr) 225px;
  }
  .topbar-actions .save-status {
    display: none;
  }
  .management-grid {
    grid-template-columns: 1fr;
  }
  .people-grid {
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .map-hint {
    display: none;
  }
  .map-footer {
    font-size: 8px;
  }
}
@media (max-width: 670px) {
  .sidebar {
    width: 55px;
    padding: 21px 5px 16px;
  }
  .workspace {
    margin-left: 55px;
  }
  .brand {
    padding: 0 4px 27px;
  }
  .brand-symbol {
    padding: 7px;
    border-radius: 9px;
  }
  .brand-symbol svg {
    width: 18px !important;
    height: 18px !important;
  }
  .topbar {
    padding: 0 14px;
    height: 59px;
  }
  .breadcrumb {
    font-size: 10px;
    gap: 8px;
  }
  .breadcrumb > span:first-child,
  .crumb-divider {
    display: none;
  }
  .topbar-actions {
    gap: 7px;
  }
  .topbar-actions .btn {
    font-size: 10px;
    padding: 7px 9px;
  }
  .language-btn {
    font-size: 10px;
  }
  .page-content {
    padding: 22px 14px 0;
  }
  .page-heading {
    display: block;
    margin-bottom: 18px;
  }
  .page-heading h1 {
    font-size: 21px;
  }
  .page-subtitle {
    line-height: 1.8;
    max-width: none;
  }
  .summary-stats {
    margin-top: 18px;
    gap: 31px;
  }
  .summary-stats strong {
    font-size: 24px;
  }
  .summary-stats span {
    font-size: 9px;
  }
  .map-view {
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .map-card {
    height: 350px;
    flex-shrink: 0;
  }
  .explorer-card {
    height: 360px;
  }
  .map-toolbar {
    min-height: 53px;
    padding: 10px 14px;
  }
  .map-footer {
    font-size: 8px;
  }
  .map-hint {
    display: none;
  }
  .directory-toolbar {
    flex-wrap: wrap;
    gap: 9px;
  }
  .search-box.wide {
    max-width: 100%;
    width: 100%;
  }
  .select-wrap {
    flex: 1;
  }
  .select-wrap select {
    width: 100%;
    max-width: none;
  }
  .result-count {
    font-size: 10px;
  }
  .people-grid {
    grid-template-columns: 1fr;
  }
  .person-card {
    min-height: 190px;
  }
  .page-footer {
    font-size: 8px;
    line-height: 1.7;
  }
  .page-footer > span:last-child {
    text-align: right;
  }
  .node-header {
    padding: 18px;
    align-items: flex-start;
  }
  .node-header h2 {
    font-size: 15px;
  }
  .node-header p {
    font-size: 10px;
  }
  .node-header .btn {
    font-size: 10px;
    padding: 7px 9px;
  }
  th,
  td {
    padding: 10px 14px;
  }
  .table-scroll {
    max-width: 100%;
  }
  .dialog-top {
    padding: 19px;
  }
  .dialog-actions {
    padding: 14px 19px;
    gap: 7px;
  }
  .dialog-body {
    padding: 19px;
  }
  .dialog-actions .btn {
    padding: 8px 11px;
    font-size: 11px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .coordinates {
    grid-template-columns: 1fr 1fr;
  }
  .country-checkboxes > div {
    grid-template-columns: repeat(3, 1fr);
  }
  .profile-hero {
    padding: 21px;
    gap: 14px;
  }
  .profile-hero h2 {
    font-size: 20px;
  }
  .avatar.profile-avatar {
    width: 70px;
    height: 70px;
  }
  .profile-body {
    padding: 0 21px 20px;
  }
  .profile-description {
    font-size: 11px;
  }
  .management-card {
    padding: 20px;
  }
  .dialog-top h2 {
    font-size: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
