.vf-civ-row { flex-wrap: wrap; }
.vf-civ-btn[data-civ="egypt"] { --c: #a86b32; }
.vf-civ-btn[data-civ="china"] { --c: #567b6a; }
.mast .vf-civ-menu { position: relative; }
.mast .vf-civ-menu > summary {
  display: flex; align-items: center; gap: .35rem; min-height: 44px;
  color: var(--ink); cursor: pointer; list-style: none;
}
.mast .vf-civ-menu > summary::-webkit-details-marker { display: none; }
.vf-civ-current { font-size: .8em; color: var(--muted); }
.vf-civ-current:not(:empty)::before { content: "· "; }
.vf-civ-options {
  position: absolute; inset: 100% auto auto 0; min-width: max-content;
  padding: .25rem; border: 1px solid var(--line); border-radius: .45rem;
  background: var(--paper); box-shadow: 0 .35rem 1rem #0002; z-index: 3;
}
.mast nav .vf-civ-options a {
  display: flex; align-items: center; min-height: 44px;
  padding: .35rem .65rem; border-radius: .25rem;
}
.mast nav .vf-civ-options a:is(:hover,:focus-visible,[aria-current="true"]) {
  background: color-mix(in srgb,var(--blue) 13%,var(--paper));
}
.mast nav:has(.vf-civ-menu[open]) .mast-paddle { visibility: hidden; }

.mast .vf-civ-menu > summary {
  border: 1px solid color-mix(in srgb,var(--line) 80%,transparent);
  border-radius: 999px; padding-inline: 9px; font: 650 .84rem/1.1 system-ui,sans-serif;
}
.mast .vf-civ-menu > summary:focus-visible { outline: 2px solid var(--blue); outline-offset: -3px; }
.mast .vf-civ-menu > summary::after {
  content: ""; width: 6px; height: 6px; transform: rotate(45deg); margin-inline: 2px;
  border: solid currentColor; border-width: 0 1px 1px 0;
}
.mast .vf-civ-menu[open] > summary::after { transform: rotate(225deg); }
.mast .vf-civ-options { min-width: 10rem; max-width: calc(100vw - 32px); }
.mast .vf-civ-options a { white-space: normal; }
.vf-civ-row:has([data-civ="china"]) { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.vf-civ-row:has([data-civ="china"]) .vf-civ-btn { min-width: 0; width: 100%; }
.vf-world-links { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-block: 9px 0; }
.vf-world-links a { min-height: 44px; display: inline-grid; place-items: center; text-underline-offset: .23em; }
@media (max-width:600px) {
  .mast .vf-civ-menu > summary { white-space: nowrap; }
  .mast .vf-civ-current { display: none; }
  .mast .vf-civ-options { inset-inline-start: 0; }
  .vf-civ-row:has([data-civ="china"]) { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
