/*
 * 乡村百科 — Wikipedia's colours and type on Bootstrap 5.
 *
 * Wikipedia (Vector): ink #202122 on white, links #3366cc (visited #795cb2), rules and frames #a2a9b1,
 * panels and the infobox #f8f9fa, the title and section headings in a serif face over a hairline,
 * square corners and no shadows. System fonts only: nothing is loaded from any other host, and a CJK
 * web font would be megabytes.
 */
:root {
  --xc-ink: #202122;
  --xc-muted: #54595d;
  --xc-link: #3366cc;
  --xc-link-visited: #795cb2;
  --xc-link-hover: #447ff5;
  --xc-rule: #a2a9b1;
  --xc-rule-light: #c8ccd1;
  --xc-panel: #f8f9fa;
  --xc-panel-dark: #eaecf0;
  --xc-serif: "Linux Libertine", Georgia, Times, "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", STSong, SimSun, serif;
  --xc-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "WenQuanYi Micro Hei", Roboto, "Helvetica Neue", Arial, sans-serif;

  --bs-body-color: var(--xc-ink);
  --bs-body-color-rgb: 32, 33, 34;
  --bs-body-bg: #fff;
  --bs-body-font-family: var(--xc-sans);
  --bs-font-sans-serif: var(--xc-sans);
  --bs-body-font-size: 0.9375rem;
  --bs-body-line-height: 1.65;
  --bs-link-color: var(--xc-link);
  --bs-link-color-rgb: 51, 102, 204;
  --bs-link-hover-color: var(--xc-link-hover);
  --bs-link-hover-color-rgb: 68, 127, 245;
  --bs-link-decoration: none;
  --bs-border-color: var(--xc-rule-light);
  --bs-secondary-color: var(--xc-muted);
  --bs-tertiary-bg: var(--xc-panel);
  --bs-primary: #3366cc;
  --bs-primary-rgb: 51, 102, 204;
  --bs-border-radius: 2px;
  --bs-border-radius-sm: 2px;
  --bs-border-radius-lg: 2px;
  --bs-box-shadow: none;
}
html[lang="zh-Hant"] {
  --xc-serif: "Linux Libertine", Georgia, Times, "Source Han Serif TC", "Noto Serif CJK TC", "Songti TC", PMingLiU, serif;
  --xc-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", Roboto, Arial, sans-serif;
}

body { background: #fff; color: var(--xc-ink); }
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.xc-main a:visited:not(.btn):not(.nav-link):not(.page-link) { color: var(--xc-link-visited); }
.xc-skip { position: absolute; left: .5rem; top: .5rem; z-index: 2000; background: #fff; padding: .25rem .5rem; }

/* Bootstrap's own pieces in Wikipedia's dress: the progressive blue, square, flat. */
.btn { --bs-btn-border-radius: 2px; --bs-btn-box-shadow: none; }
.btn-primary { --bs-btn-bg: #3366cc; --bs-btn-border-color: #3366cc; --bs-btn-hover-bg: #447ff5; --bs-btn-hover-border-color: #447ff5;
  --bs-btn-active-bg: #2a4b8d; --bs-btn-active-border-color: #2a4b8d; --bs-btn-disabled-bg: #c8ccd1; --bs-btn-disabled-border-color: #c8ccd1; }
.btn-outline-primary { --bs-btn-color: #3366cc; --bs-btn-border-color: #3366cc; --bs-btn-hover-bg: #eaf3ff; --bs-btn-hover-color: #2a4b8d;
  --bs-btn-hover-border-color: #3366cc; --bs-btn-active-bg: #d9e6ff; --bs-btn-active-color: #2a4b8d; }
.btn-outline-secondary { --bs-btn-color: var(--xc-ink); --bs-btn-border-color: var(--xc-rule); --bs-btn-hover-bg: #fff;
  --bs-btn-hover-color: #404244; --bs-btn-hover-border-color: #72777d; --bs-btn-bg: var(--xc-panel); }
.form-control, .form-select { border-color: var(--xc-rule); border-radius: 2px; }
.form-control:focus, .form-select:focus { border-color: #3366cc; box-shadow: inset 0 0 0 1px #3366cc; }
.alert { border-radius: 2px; }
.badge { border-radius: 2px; font-weight: 500; }
.table { --bs-table-border-color: var(--xc-rule-light); }
.pagination { --bs-pagination-border-radius: 2px; --bs-pagination-active-bg: #3366cc; --bs-pagination-active-border-color: #3366cc; }

/* ---- the header: the wordmark, the search, the account -------------------------------------- */
.xc-header { border-bottom: 1px solid var(--xc-panel-dark); padding: .6rem 0; background: #fff; }
.xc-header .container-xxl { padding-left: 16px; padding-right: 16px; }
.xc-logo { display: flex; align-items: center; gap: .55rem; color: var(--xc-ink); }
.xc-logo:hover { text-decoration: none; }
.xc-logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem;
  border: 1px solid var(--xc-rule); border-radius: 50%; background: var(--xc-panel); font-family: var(--xc-serif);
  font-size: 1.45rem; line-height: 1; color: var(--xc-ink); }
.xc-wordmark { display: flex; flex-direction: column; line-height: 1.15; }
.xc-wordmark-name { font-family: var(--xc-serif); font-size: 1.35rem; letter-spacing: .08em; }
.xc-wordmark-tag { font-size: .72rem; color: var(--xc-muted); letter-spacing: .04em; }
.xc-search { max-width: 34rem; min-width: 12rem; }
.xc-search .form-control { border-right: 0; }
.xc-menu-btn { padding: .3rem .45rem; color: var(--xc-ink); border: 1px solid transparent; }
.xc-menu-btn:hover { border-color: var(--xc-rule); }
.xc-user { font-size: .875rem; }
.xc-user > a { white-space: nowrap; }
.xc-menu { position: relative; }
.xc-menu > summary { list-style: none; cursor: pointer; color: var(--xc-link); white-space: nowrap; }
.xc-menu > summary::-webkit-details-marker { display: none; }
.xc-menu > summary::after { content: " ▾"; font-size: .75em; }
.xc-username { display: inline-block; max-width: 10em; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.xc-menu-list { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 1050; min-width: 10rem; background: #fff;
  border: 1px solid var(--xc-rule); box-shadow: 0 2px 2px rgba(0, 0, 0, .1); padding: .3rem 0; }
.xc-menu-list a, .xc-menu-list button { display: block; width: 100%; text-align: left; padding: .3rem .9rem; color: var(--xc-link);
  background: none; border: 0; font: inherit; white-space: nowrap; }
.xc-menu-list a:hover, .xc-menu-list button:hover { background: var(--xc-panel); text-decoration: none; }
.xc-menu-list a[aria-current] { color: var(--xc-ink); font-weight: 600; }

/* ---- the page: sidebar and content ------------------------------------------------------------ */
.xc-page { padding-left: 16px; padding-right: 16px; }
.xc-side { font-size: .875rem; }
.xc-side-inner { padding: 1rem 1rem 1rem 0; }
@media (min-width: 992px) { .xc-side-inner { position: sticky; top: 0; max-height: 100vh; overflow-y: auto; } }
.xc-side-h { font-size: .8rem; font-weight: 600; color: var(--xc-muted); margin: .75rem 0 .35rem; padding-bottom: .2rem;
  border-bottom: 1px solid var(--xc-panel-dark); font-family: var(--xc-sans); }
.xc-side li { margin: .2rem 0; }
.xc-toc li { line-height: 1.35; margin: .25rem 0; }
.xc-toc .xc-toc-3 { padding-left: .9rem; font-size: .95em; }
.xc-main { padding: 1rem 0 2.5rem; min-width: 0; }
@media (min-width: 992px) { .xc-main { padding-left: 1.75rem; border-left: 1px solid var(--xc-panel-dark); } }
@media (max-width: 991.98px) { .xc-side.show, .xc-side.collapsing { border-bottom: 1px solid var(--xc-panel-dark); } }

.xc-flashes { position: fixed; top: .75rem; left: 50%; transform: translateX(-50%); z-index: 1080; width: min(40rem, calc(100% - 2rem)); }

/* ---- an article ---------------------------------------------------------------------------- */
.xc-tabs { border-bottom: 1px solid var(--xc-panel-dark); margin-bottom: .6rem; font-size: .875rem; }
.xc-tabs .nav-link { padding: .35rem .65rem; color: var(--xc-link); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.xc-tabs .nav-link.active { color: var(--xc-ink); border-bottom-color: var(--xc-ink); }
.xc-tabs-left .nav-link { padding-left: 0; }
.xc-title { font-family: var(--xc-serif); font-weight: normal; font-size: 1.85rem; line-height: 1.3;
  border-bottom: 1px solid var(--xc-rule); padding-bottom: .15rem; margin: .2rem 0 .25rem; overflow-wrap: anywhere; }
.xc-sub { font-size: .8125rem; color: var(--xc-muted); margin-bottom: .5rem; }
.xc-trail { color: var(--xc-muted); }
.xc-note { margin-bottom: .75rem; }
.xc-py { color: var(--xc-muted); font-size: .88em; font-weight: normal; }

.xc-article { overflow-wrap: anywhere; }
.xc-article::after { content: ""; display: table; clear: both; }
.xc-article h2, .xc-body h2, .xc-prose h2, .xc-preview h2 { font-family: var(--xc-serif); font-weight: normal; font-size: 1.5rem; line-height: 1.3;
  border-bottom: 1px solid var(--xc-rule); padding-bottom: .1rem; margin: 1.5rem 0 .6rem; }
.xc-article h3, .xc-body h3, .xc-prose h3 { font-size: 1.1rem; font-weight: 700; margin: 1.1rem 0 .4rem; }
.xc-secedit { font-family: var(--xc-sans); font-size: .8rem; color: var(--xc-muted); margin-left: .6rem; white-space: nowrap; }
.xc-lead { margin-bottom: .75rem; }
.xc-lead p:last-child { margin-bottom: 0; }
.xc-body p, .xc-lead p { margin-bottom: .6rem; }
.xc-body blockquote { border-left: 4px solid var(--xc-panel-dark); padding: .2rem 0 .2rem 1rem; color: #404244; margin: .75rem 0; }
.xc-body table, .xc-prose table { border-collapse: collapse; margin: .75rem 0; background: var(--xc-panel); max-width: 100%; display: block; overflow-x: auto; }
.xc-body th, .xc-body td { border: 1px solid var(--xc-rule); padding: .3rem .55rem; vertical-align: top; }
.xc-body th { background: var(--xc-panel-dark); text-align: center; }
.xc-stubnote { color: var(--xc-muted); font-size: .875rem; border-left: 3px solid var(--xc-rule-light); padding-left: .6rem; }
.xc-cite { font-size: .75em; line-height: 1; }

/* the infobox, at the right of an article on a wide screen and above it on a narrow one */
.xc-infobox { float: right; clear: right; width: 22rem; max-width: 100%; margin: .25rem 0 1rem 1.5rem; border: 1px solid var(--xc-rule);
  background: var(--xc-panel); font-size: .84rem; line-height: 1.5; border-collapse: separate; border-spacing: 3px; }
.xc-infobox th.xc-ib-title { text-align: center; font-size: 1.1rem; font-weight: 700; padding: .4rem .5rem .3rem; white-space: normal; width: auto;
  background: var(--xc-panel-dark); }
.xc-infobox-sub { font-weight: normal; font-size: .82rem; color: var(--xc-muted); }
.xc-infobox th { text-align: left; vertical-align: top; padding: .25rem .4rem; width: 6.5em; font-weight: 600; white-space: nowrap; }
.xc-infobox td { vertical-align: top; padding: .25rem .4rem; }
.xc-infobox.float-none { float: none; margin-left: 0; }
/* on a phone, as Wikipedia's mobile pages: the lead first, then the infobox, then the rest */
@media (max-width: 767.98px) {
  .xc-infobox { float: none; width: 100%; margin: .5rem 0 1rem; }
  .xc-article { display: flex; flex-direction: column; }
  .xc-article > * { order: 3; }
  .xc-article > .xc-lead { order: 1; }
  .xc-article > .xc-infobox { order: 2; }
}

.xc-toc-box { display: inline-block; min-width: 12rem; max-width: 100%; border: 1px solid var(--xc-rule); background: var(--xc-panel);
  padding: .5rem 1rem; margin: .25rem 0 1rem; font-size: .875rem; }
.xc-toc-title { font-weight: 700; text-align: center; margin-bottom: .25rem; }
.xc-toc-box .xc-toc-3 { padding-left: 1rem; }

.xc-refs { font-size: .875rem; padding-left: 2rem; }
.xc-refs li:target { background: #eaf3ff; }
.xc-meta { border-top: 1px solid var(--xc-panel-dark); margin-top: 2rem; padding-top: .6rem; clear: both; }

/* lists of places */
.xc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .15rem 1.25rem; margin-bottom: 1rem; }
.xc-grid-wide { grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); }
.xc-admins li { padding: .25rem 0; border-bottom: 1px dotted var(--xc-rule-light); }
.xc-nats { font-size: .875rem; }
.xc-xing { display: inline-block; font-size: .75rem; line-height: 1.3; padding: 0 .3rem; border: 1px solid var(--xc-rule-light);
  color: var(--xc-muted); background: #fff; margin-left: .2rem; }
.xc-surnames li { padding: .2rem 0; }
.xc-surname { font-size: 1.15rem; margin-right: .4rem; }
.xc-results { margin-bottom: 1.5rem; }
.xc-result { padding: .45rem 0; border-bottom: 1px solid var(--xc-panel-dark); }
.xc-badge { background: var(--xc-panel); color: var(--xc-muted); border: 1px solid var(--xc-rule-light); }
.xc-chips { display: flex; flex-wrap: wrap; gap: .3rem .9rem; }

/* boxes: the front page, forms */
.xc-box { border: 1px solid var(--xc-rule-light); background: #fff; padding: 1rem; margin-bottom: 1rem; }
.xc-box-h { font-family: var(--xc-serif); font-weight: normal; font-size: 1.2rem; margin: -1rem -1rem .8rem; padding: .4rem 1rem;
  background: #eaf3ff; border-bottom: 1px solid #a3b0bf; }
.xc-welcome { border: 1px solid var(--xc-rule); background: var(--xc-panel); padding: 1.25rem 1.5rem; }
.xc-welcome-h { font-family: var(--xc-serif); font-weight: normal; font-size: 1.9rem; margin-bottom: .5rem; }
.xc-home-search { max-width: 40rem; }
.xc-recent li { padding: .15rem 0; }
.xc-stat { font-size: 2rem; font-family: var(--xc-serif); line-height: 1.2; }
.xc-prose { max-width: 52rem; }
.xc-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* history and differences, in Wikipedia's diff colours */
.xc-history li { padding: .25rem 0; border-bottom: 1px dotted var(--xc-rule-light); }
.xc-hist-cur { font-weight: 600; }
.xc-hist-note { color: var(--xc-muted); font-style: italic; }
.xc-diffpart { margin-bottom: 1.25rem; }
.xc-diff li { padding: .2rem .5rem; border-left: 4px solid transparent; margin-bottom: 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.xc-d-same { color: var(--xc-muted); border-left-color: var(--xc-panel-dark) !important; }
.xc-d-del { border-left-color: #ffe49c !important; background: #fffaeb; }
.xc-d-ins { border-left-color: #a3d3ff !important; background: #f3f9ff; }
.xc-d-chg { border-left-color: #c8ccd1 !important; background: var(--xc-panel); }
.xc-d-fold { color: var(--xc-muted); }
.xc-diff del { background: #feeec8; text-decoration: none; color: inherit; }
.xc-diff ins { background: #d8ecff; text-decoration: none; color: inherit; }
.xc-d-del del, .xc-d-ins ins { background: none; }
.xc-table th { font-weight: 600; background: var(--xc-panel); }
.xc-admin-nav .nav-link { color: var(--xc-link); }
.xc-admin-nav .nav-link.active { color: var(--xc-ink); }

/* the editor */
.xc-rich { border: 1px solid var(--xc-rule); }
.xc-richbar { display: flex; flex-wrap: wrap; gap: .25rem; padding: .3rem; background: var(--xc-panel); border-bottom: 1px solid var(--xc-rule-light); align-items: center; }
.xc-richbar .btn { min-width: 2.1rem; font-family: var(--xc-serif); }
.xc-richbar .btn[data-cmd="bold"] { font-weight: 700; }
.xc-richbar .btn[data-cmd="italic"] { font-style: italic; }
.xc-richbox { min-height: 22rem; max-height: 75vh; overflow-y: auto; border: 0; border-radius: 0; padding: .75rem 1rem; line-height: 1.7; }
.xc-richbox-sm { min-height: 7rem; }
.xc-richbox:focus { box-shadow: none; outline: 2px solid #3366cc; outline-offset: -2px; }
.xc-richbox h2 { font-family: var(--xc-serif); font-weight: normal; font-size: 1.4rem; border-bottom: 1px solid var(--xc-rule); margin: 1rem 0 .5rem; }
.xc-richbox h3 { font-size: 1.1rem; font-weight: 700; margin: .9rem 0 .4rem; }
.xc-richbox blockquote { border-left: 4px solid var(--xc-panel-dark); padding-left: .8rem; color: #404244; }
.xc-richbox table { border-collapse: collapse; margin: .5rem 0; }
.xc-richbox td, .xc-richbox th { border: 1px solid var(--xc-rule); padding: .25rem .5rem; min-width: 3rem; }
.xc-richsrc[hidden] { display: none; }
.xc-preview { border: 1px dashed var(--xc-rule); padding: 1rem 1.25rem; background: #fffdf5; position: relative; }
.xc-preview-label { position: absolute; top: -.7rem; left: .8rem; background: #fffdf5; padding: 0 .4rem; font-size: .8rem; color: var(--xc-muted); }

/* the footer */
.xc-footer { border-top: 1px solid var(--xc-rule); margin-top: 1rem; padding: 1.1rem 0 1.5rem; font-size: .8rem; color: var(--xc-muted); background: #fff; }
.xc-footer .container-xxl { padding-left: 16px; padding-right: 16px; }

/* ---- the map (www/assets/placemap.js, zpmap.js), as chinazupu.com draws it --------------------- */
.pmap-canvas { position: relative; min-height: 18rem; border: 1px solid var(--xc-rule); isolation: isolate; overflow: hidden; }
.pmap-here .pmap-canvas { height: 18rem; min-height: 0; }
@media (min-width: 992px) { .pmap-here .pmap-canvas { height: 26rem; } }
.pmap-dot { border-radius: 50%; background: #3366cc; border: 2px solid #fff; box-shadow: 0 0 2px rgba(0, 0, 0, .5); }
.pmap-dot-admin { border-radius: 2px; }
.pmap-dot-here { background: #d33; }
.pmap-tag { font-size: .75rem; line-height: 1.3; color: #202122; background: rgba(255, 255, 255, .85); padding: 0 .25rem; border-radius: 2px; }
.pmap-tag-here { font-weight: 700; }
.pmap-loading { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center;
  color: var(--xc-muted); background: var(--xc-panel); }
.pmap-pop { max-height: 16rem; overflow: auto; }
.pmap-item + .pmap-item { border-top: 1px solid var(--xc-rule-light); margin-top: .45rem; padding-top: .45rem; }
.pmap-xings { margin: .25rem 0; }
.pmap-open { margin-top: .15rem; }
.zpmap { position: relative; overflow: hidden; touch-action: pan-x pan-y; background: #e9ecef; cursor: grab;
  -webkit-user-select: none; user-select: none; font-size: .9rem; outline: none; height: 100%; }
.zpmap:focus-visible { box-shadow: 0 0 0 .2rem rgba(51, 102, 204, .35); }
.zpmap.zpmap-dragging { cursor: grabbing; }
.zpmap-tiles, .zpmap-markers { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.zpmap-tiles { transform-origin: 0 0; }
.zpmap-markers { pointer-events: none; }
img.zpmap-tile { position: absolute; width: 256px; height: 256px; max-width: none; border: 0; -webkit-user-drag: none; pointer-events: none; }
svg.zpmap-vec { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }
svg.zpmap-vec .zpmap-circle { pointer-events: visiblePainted; cursor: pointer; }
.zpmap-marker { position: absolute; pointer-events: auto; cursor: pointer; }
.zpmap-label { position: absolute; transform: translateY(-50%); white-space: nowrap; pointer-events: none; }
.zpmap-popup { position: absolute; z-index: 3; cursor: auto; -webkit-user-select: text; user-select: text; }
.zpmap-popup-inner { position: relative; background: #fff; color: var(--xc-ink); border-radius: 2px; border: 1px solid var(--xc-rule);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2); padding: .6rem 36px .6rem .9rem; line-height: 1.5; }
.zpmap-popup-content { overflow-wrap: anywhere; }
.zpmap-popup-tip { width: 14px; height: 14px; margin: -8px auto 0; background: #fff; transform: rotate(45deg);
  border-right: 1px solid var(--xc-rule); border-bottom: 1px solid var(--xc-rule); }
button.zpmap-close { position: absolute; top: 0; right: 0; display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; margin: 0; padding: 0; background: none; border: 0; color: var(--xc-muted); font-size: 1.75rem; line-height: 1; }
button.zpmap-close:hover { color: var(--xc-ink); }
@media (pointer: coarse) {
  .zpmap-popup-inner { padding-right: 44px; }
  button.zpmap-close { width: 44px; height: 44px; font-size: 2.1rem; }
}
.zpmap-ctl { position: absolute; right: 10px; bottom: 26px; z-index: 4; display: flex; flex-direction: column;
  align-items: center; width: 40px; background: #fff; border-radius: 2px; box-shadow: rgba(0, 0, 0, .3) 0 1px 4px -1px; user-select: none; }
.zpmap-ctl button { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 0;
  padding: 0; border: 0; border-radius: 2px; background: none; color: #666; cursor: pointer; }
.zpmap-ctl button:hover, .zpmap-ctl button:active { background: none; color: #333; }
.zpmap-ctl button:focus-visible { box-shadow: inset 0 0 0 2px #3366cc; }
.zpmap-ctl button[aria-disabled="true"], .zpmap-ctl button[aria-disabled="true"]:hover { color: #d0d0d0; cursor: default; }
.zpmap-ctl svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.zpmap-ctl-rule { width: 30px; height: 1px; background: #e6e6e6; }
.zpmap-attrib { position: absolute; right: 0; bottom: 0; z-index: 4; padding: 0 6px; background: rgba(255, 255, 255, .85);
  color: #333; font-size: 11px; line-height: 1.6; }
.zpmap-attrib a { color: #3366cc; }
.zpmap-hint { position: absolute; top: 10px; left: 50%; z-index: 5; transform: translateX(-50%); max-width: calc(100% - 20px);
  padding: .35rem .85rem; border-radius: 999px; background: rgba(32, 33, 36, .85); color: #fff; font-size: .9rem;
  line-height: 1.4; text-align: center; width: max-content; pointer-events: none; opacity: 0; transition: opacity .25s; }
.zpmap-hint.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .zpmap-hint { transition: none; } }

@media (max-width: 575.98px) {
  .xc-title { font-size: 1.55rem; }
  .xc-wordmark-tag { display: none; }
  .xc-search { min-width: 100%; }
}
