:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --ink: #192d29;
  --muted: #546963;
  --paper: #f3f5ef;
  --line: #dbe3d8;
  --deep: #152822;
  --accent: #b9ed89;
  --control: #223832;
  background: var(--paper);
  color: var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, textarea, summary { font: inherit; }
button, summary { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button, .header-button {
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  background: #fbfcf7;
  min-height: 34px;
  padding: 6px 11px;
  font-weight: 600;
}
button:hover { background: #eaf0e5; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 2px solid #76b65d; outline-offset: 3px; }
h1, h2, p { margin: 0; }
input, textarea {
  width: 100%; min-width: 0;
  border: 1px solid #cad7cb;
  border-radius: 6px;
  background: #fbfcf8;
  color: var(--ink);
  padding: 7px 8px;
}
input[type="checkbox"] { accent-color: #316a50; width: 15px; height: 15px; margin: 0; cursor: pointer; }
input[type="color"] { min-height: 34px; padding: 3px; }
textarea { resize: vertical; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 800; white-space: nowrap; }
.brand-mark {
  width: 27px; height: 27px; position: relative; display: inline-block;
  background: #2e4939; border: 1px solid #5c845d; border-radius: 7px;
}
.brand-mark::before, .brand-mark::after {
  content: ""; position: absolute; width: 10px; height: 10px;
  border: 1.5px solid var(--accent); transform: rotate(45deg) skew(-9deg,-9deg); left: 7px;
}
.brand-mark::before { top: 5px; background: #5e8d59; z-index: 1; }
.brand-mark::after { top: 9px; opacity: .68; }
.header-actions { margin-left: auto; display: flex; gap: 9px; align-items: center; }
.header-button { display: inline-flex; align-items: center; gap: 7px; color: #ecf4eb; background: #243a32; border-color: #46594f; font-size: 13px; list-style: none; white-space: nowrap; }
.header-button:hover { background: #304b40; }
.header-button::-webkit-details-marker { display: none; }
.primary { background: var(--accent); color: #173022; border-color: var(--accent); font-size: 13px; white-space: nowrap; }
.primary:hover { background: #cef4ac; }
.export-menu { position: relative; }
.export-options { position: absolute; z-index: 10; right: 0; top: calc(100% + 8px); min-width: 174px; padding: 5px; display: grid; gap: 2px; border: 1px solid #cdd9cc; border-radius: 8px; background: #f9fbf4; box-shadow: 0 12px 26px #10271f44; }
.export-options button { border: 0; text-align: left; background: transparent; font-weight: 500; font-size: 13px; white-space: nowrap; }
.export-options button:hover { background: #e8f0e1; }
.map-stage { background: #27332a; position: relative; min-width: 0; min-height: 0; overflow: hidden; color: #f1f8e9; isolation: isolate; }
#terrain, #map-labels { display: block; width: 100%; height: 100%; position: absolute; inset: 0; }
#terrain { touch-action: none; cursor: default; }
#terrain.is-view-mode { cursor: url('/assets/hand-cursor.svg') 12 11, grab; }
#terrain:active { cursor: grabbing; }
#terrain.is-drawing { cursor: crosshair; }
#terrain.is-movable { cursor: move; }
#terrain.is-moving-feature, #terrain.is-moving-building { cursor: grabbing; }
#terrain.is-area-edge { cursor: crosshair; }
#terrain.is-eraser-target { cursor: pointer; }
#map-labels { pointer-events: none; }
.map-controls, .drawing-bar {
  display: flex; align-items: center; gap: 3px;
  padding: 4px; background: #172b25ee; border: 1px solid #617467; border-radius: 8px;
  box-shadow: 0 3px 12px #10281f50;
}
.map-controls { flex-direction: column; pointer-events: auto; }
.map-controls button, .drawing-bar button {
  background: transparent; color: #ecf5e8; border: 1px solid transparent; font-size: 13px; min-height: 32px;
}
.map-controls button { font-size: 20px; width: 35px; padding: 0; }
.map-controls button:hover, .drawing-bar button:hover { background: #3b5547; }
.drawing-bar button:not(:disabled):first-of-type { background: #b9ed89; color: #1c3927; }
.map-hud {
  position: absolute; right: 12px; bottom: 12px; display: grid; justify-items: end; gap: 6px;
  pointer-events: none; color: #f1f7ec; font-size: 12px; font-weight: 600;
}
.map-hud span { background: #162a23de; border: 1px solid #687e6d; border-radius: 5px; padding: 5px 8px; }
#coordinates { font-variant-numeric: tabular-nums; }
.map-bottom { position: absolute; inset: auto 12px 12px; pointer-events: none; }
.map-credit {
  width: fit-content;
  max-width: calc(100% - 120px);
  color: #b7c1ba;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.map-credit a { pointer-events: auto; }
.map-credit a:hover, .map-credit a:focus-visible { text-decoration: underline; color: #edf5ed; }
.drawing-bar { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(100% + 8px); width: max-content; max-width: calc(100% - 118px); flex-wrap: wrap; gap: 7px; padding-left: 9px; font-size: 12px; pointer-events: auto; }
.drawing-bar span { min-width: 0; }
.drawing-bar button { flex: none; white-space: nowrap; }
.map-loading {
  position: absolute; inset: 0; z-index: 4; display: grid; place-content: center;
  justify-items: center; gap: 12px; padding: 20px; text-align: center; background: #1c2e28;
}
.spinner { width: 25px; height: 25px; border-radius: 50%; border: 2px solid #5f7f6e; border-right-color: var(--accent); animation: spin 850ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.inspector-section { padding: 17px 16px; border-bottom: 1px solid var(--line); }
.inspector-section h2 { font-size: 15px; margin-bottom: 12px; }
.coordinate-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 7px; align-items: end; }
.coordinate-form label, .stack-field, .search-field { display: grid; gap: 5px; font-size: 12px; font-weight: 650; color: #4c635a; min-width: 0; }
.coordinate-form input, .search-field input, .stack-field input, .stack-field textarea { font-size: 13px; }
.coordinate-form button, .wide-button, .form-actions button { font-size: 13px; }
.wide-button { margin-top: 9px; width: 100%; text-align: left; }
.wide-button span { color: #357456; font-size: 16px; }
.search-field { margin-top: 14px; }
.landmark-results, .feature-list { display: grid; gap: 4px; margin-top: 7px; max-height: 208px; overflow: auto; }
.landmark-results button, .feature-list button { font-size: 12px; font-weight: 500; text-align: left; display: flex; justify-content: space-between; gap: 7px; min-width: 0; }
.feature-list button > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.landmark-results small, .feature-list small { color: var(--muted); white-space: nowrap; }
.selection-card { padding: 11px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcf8; font-size: 12px; color: var(--muted); }
.selection-card strong { display: block; color: var(--ink); font-size: 14px; margin-bottom: 5px; }
.selection-card p + p { margin-top: 4px; }
.layers { display: grid; gap: 9px; }
.layers label { display: grid; grid-template-columns: 16px 1fr auto; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; }
.layer-swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; border: 1px solid #b9c7b8; }
.swatch-boundary { background: linear-gradient(135deg,#e8eee3 44%,#55906d 45% 55%,#e8eee3 56%); }
.swatch-city { background: #ab8b56; }
.swatch-label { background: #2a4b3d; }
.swatch-grid { background: repeating-linear-gradient(0deg,#8d9f91 0 1px,#e4eadf 1px 4px); }
.swatch-forest { background: #698558; }
.swatch-annotation { background: #e19252; }
.feature-list button.is-active { background: #dcecd2; border-color: #8cb58a; color: #204b33; }
.form-actions { display: flex; gap: 6px; margin-top: 9px; }
.feature-list p { color: var(--muted); font-size: 12px; }
#feature-form { margin-top: 13px; display: grid; gap: 8px; }
#feature-form .form-actions { margin-top: 0; }
.form-actions .danger { color: #963f2d; }
.count { color: #61746b; font-weight: 500; margin-left: 3px; }
.toast {
  position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: 24px;
  width: max-content; max-width: calc(100% - 36px); color: #f2f9ed; background: #18352b;
  padding: 10px 14px; border-radius: 7px; box-shadow: 0 5px 22px #14241a60; font-size: 13px;
  pointer-events: none;
}
.map-stage:fullscreen, .map-stage.expanded { width: 100%; height: 100%; }
.map-stage.expanded { position: fixed; inset: 0; z-index: 15; }
.catalog {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.catalog .site-header, .catalog-footer {
  color: #f2f6ed;
  background: #132720;
}
.catalog .site-header {
  position: sticky;
  top: 0;
  z-index: 8;
  border-bottom: 1px solid #3d5143;
}
.catalog-header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 76px;
  max-width: 1376px;
  margin: auto;
  padding: 10px 28px;
}
.catalog-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 800; letter-spacing: .6px; }
.catalog-brand .brand-mark { flex: none; }
.catalog-brand small { display: block; margin-top: 3px; color: #aab6af; font-size: .6875rem; font-weight: 500; letter-spacing: 1.2px; }
.catalog-main {
  flex: 1;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 52px) 24px 50px;
}
.catalog-announcements {
  display: grid;
  gap: 6px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.6;
}
.catalog-main > h1 { font-size: clamp(27px, 3.5vw, 38px); line-height: 1.2; }
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 16px;
  margin-top: 16px;
}
.map-card {
  display: block; min-width: 0; position: relative; background: #fafbf6;
  border: 1px solid #cedbcd; border-radius: 12px; box-shadow: 0 4px 20px #354b3312;
}
.map-card:hover { border-color: #8caf83; box-shadow: 0 6px 24px #354b3320; }
.map-thumbnail { aspect-ratio: 16 / 9; background: #26372d; border-radius: 11px 11px 0 0; overflow: hidden; }
.map-thumbnail img { width: 100%; height: 100%; display: block; object-fit: cover; }
.map-card-content { padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.map-card h2, .history-details h3 { margin: 0; font-size: 16px; }
.card-open { font-size: 16px; font-weight: 700; color: #325c41; }
.drafts-section { margin-top: 34px; }
.drafts-section > h2 { font-size: 23px; }
.catalog-empty { color: var(--muted); font-size: 14px; margin-top: 12px; }
.history-card > a { display: block; height: 100%; border-radius: inherit; }
.history-details { padding: 12px 14px 14px; }
.history-details h3 { overflow-wrap: anywhere; }
.history-details p { color: var(--muted); font-size: 12px; margin-top: 5px; }
.history-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 12px;
  color: #f2f6ed;
  background: #132720e8;
  border-color: #81968a;
}
.history-remove:hover { background: #304b40; }
.catalog-error { color: #8a3b27; margin-top: 12px; }
.catalog-footer { border-top: 1px solid #3d5143; }
.catalog-footer-inner {
  max-width: 1376px;
  margin: auto;
  padding: 28px 48px;
}
.catalog-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 9px 20px;
  max-width: 1376px;
  margin: auto;
  padding: 19px 48px;
  border-top: 1px solid #3d5143;
  color: #aab6af;
  font-size: .8125rem;
  line-height: 1.6;
}
@media (max-width: 900px) {
  .catalog-footer-inner, .catalog-footer-bottom { padding-inline: 28px; }
}
@media (max-width: 600px) {
  .catalog-header-inner { min-height: 70px; padding: 9px 14px; gap: 8px; }
  .catalog-brand { gap: 7px; font-size: 1rem; letter-spacing: 0; }
  #catalog-import { padding-inline: 8px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .catalog-footer-inner, .catalog-footer-bottom { padding-inline: 22px; }
}
@media (max-width: 360px) {
  .catalog-main { padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
}

/* The workspace canvas always fills the viewport. Tools sit over the map. */
.workspace { overflow: hidden; }
.workspace .map-workspace {
  display: block;
  height: 100dvh;
  min-height: 0;
}
.workspace .map-stage { height: 100%; }
.map-topbar {
  position: absolute;
  z-index: 6;
  inset: 12px 12px auto;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}
.map-heading {
  display: grid;
  min-width: 0;
  max-width: min(260px, 36%);
  pointer-events: auto;
  background: #182c25ee;
  border: 1px solid #60786b;
  border-radius: 8px;
}
.map-topbar .brand {
  padding: 7px 9px 5px;
  font-size: 14px;
  line-height: 17px;
}
.map-brand-text { display: grid; gap: 2px; }
.map-domain { color: #aab6af; font-size: 11px; font-weight: 400; line-height: 13px; }
.map-title-row {
  position: relative;
  min-width: 0;
  border-top: 1px solid #455f52;
}
#map-title, #draft-name {
  display: block;
  width: 100%;
  min-height: 32px;
  padding: 4px 9px;
  border: 0;
  border-radius: 0 0 7px 7px;
  font-size: 13px;
  font-weight: 600;
}
#map-title {
  background: transparent;
  color: inherit;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#map-title:hover:not(:disabled) { background: #304b40; }
#draft-name {
  position: absolute;
  inset: 0;
  height: 100%;
}
#draft-name:not([hidden]) + h1 { visibility: hidden; }
.map-topbar .header-actions { --toolbar-height: 42px; min-width: 0; max-width: 100%; gap: 5px; }
.map-topbar .header-actions > * { flex: none; pointer-events: auto; }
.map-topbar .header-actions > .placement-toolbar { flex: 0 1 auto; }
.map-topbar .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--toolbar-height);
  height: var(--toolbar-height);
  padding: 0;
  flex: none;
}
.icon-button svg, .map-help-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.map-icon-symbols { position: absolute; }
.map-help-icon { vertical-align: -.23em; color: #285b3d; }
.map-topbar .icon-button[aria-expanded="true"] {
  color: var(--accent);
  background: #304b40;
}
.map-dialog {
  width: min(480px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid #93a99a;
  border-top: 3px solid #71a56d;
  border-radius: 12px;
  background: #f9fbf4;
  box-shadow: 0 14px 42px #10281f70;
}
#map-help-dialog { width: min(570px, calc(100% - 24px)); }
.map-dialog::backdrop { background: #101f1ac7; }
.map-dialog-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100dvh - 30px);
}
.map-dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px 10px;
}
.map-dialog-heading h2 { font-size: 21px; line-height: 1.4; }
.map-dialog-close {
  flex: none;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 21px;
  line-height: 1;
}
.map-dialog-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 4px 20px 20px;
  font-size: 14px;
  line-height: 1.65;
}
.map-update-list { margin: 0; padding-left: 1.5em; }
.map-update-list li::marker { color: #36734c; font-weight: 700; }
.map-help-list { margin: 0; }
.map-help-list dt { font-weight: 700; }
.map-help-list dd { margin: 2px 0 0; color: #465b51; }
.map-help-list dt:not(:first-child) { margin-top: 12px; }
.map-help-warning, .catalog-announcements { color: #a32923; font-weight: 700; }
.map-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 10px 20px;
  border-top: 1px solid var(--line);
  background: #eef4e9;
}
.map-update-preference {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: auto;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.map-mode {
  display: flex;
  gap: 3px;
  padding: 4px;
  margin-right: 3px;
  height: var(--toolbar-height);
  border: 1px solid #617467;
  border-radius: 8px;
  background: #172b25f2;
}
.map-mode .icon-button {
  min-height: 0;
  width: 32px;
  height: 32px;
  border: 0;
  color: #edf6ed;
  background: transparent;
}
.map-mode .icon-button:hover:not(:disabled) { background: #3b5547; }
.map-mode .icon-button[aria-pressed="true"] { color: #1c3927; background: var(--accent); }
.map-topbar .brand-mark { width: 23px; height: 23px; }
.map-topbar .brand-mark::before, .map-topbar .brand-mark::after { left: 5px; top: 4px; }
.map-topbar .brand-mark::after { top: 8px; }
.workspace .inspector {
  position: absolute;
  top: 62px;
  right: 12px;
  z-index: 5;
  width: var(--panel-width, min(254px, calc(100% - 68px)));
  max-width: calc(100% - 24px);
  height: var(--panel-height, auto);
  max-height: max(75px, calc(100% - var(--panel-reserve, 258px)));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid #93a99a;
  border-radius: 9px;
  background: #f3f6eef7;
  box-shadow: 0 6px 24px #10281f66;
}
.workspace .inspector.is-resized { --panel-reserve: 74px; }
.panel-resize { position: absolute; z-index: 1; touch-action: none; }
.panel-resize-left { inset: 35px auto 12px 0; width: 6px; cursor: ew-resize; }
.panel-resize-bottom { inset: auto 6px 0 15px; height: 6px; cursor: ns-resize; }
.panel-resize-corner {
  bottom: 0;
  left: 0;
  width: 18px;
  height: 17px;
  min-height: 0;
  border: 0;
  padding: 0;
  background: linear-gradient(45deg, transparent 33%, #72887b 34% 41%, transparent 42% 52%, #72887b 53% 60%, transparent 61%) 3px 5px / 9px 9px no-repeat;
  cursor: nesw-resize;
}
.panel-resize-corner:hover { background-color: #dcecd2; }
.panel-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
  padding: 5px 6px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.panel-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.panel-tabs button, #panel-close {
  min-height: 29px;
  font-size: 12px;
  padding: 4px 8px;
}
.panel-tabs button { padding-inline: 5px; }
.panel-tabs button[aria-pressed="true"] { background: #dcecd2; border-color: #8cb58a; }
#panel-close { font-size: 18px; line-height: 1; }
.panel-body { overflow: auto; min-height: 0; overscroll-behavior: contain; }
.workspace .inspector-section { padding: 10px 11px; }
.workspace .inspector-section h2 { font-size: 13px; margin-bottom: 8px; }
.workspace .feature-list { max-height: 132px; }
.feature-type { color: var(--muted); font-size: 12px; }
@media (max-width: 1040px) {
  .map-topbar { flex-direction: column; align-items: flex-start; gap: 6px; }
  .map-heading { max-width: min(260px, 100%); }
  .workspace .inspector { top: 146px; --panel-reserve: 342px; }
  .workspace .inspector.is-resized { --panel-reserve: 158px; }
}
@media (max-width: 720px) {
  .map-topbar { inset: 7px 7px auto; }
  .map-topbar .brand { padding-inline: 5px; gap: 4px; }
  .map-topbar .header-actions { gap: 4px; }
  .map-topbar .header-actions > .icon-button, .map-topbar summary.icon-button { width: 36px; }
  .map-mode .icon-button { width: 28px; }
  .workspace .inspector { right: 7px; top: 141px; --panel-reserve: 337px; }
  .workspace .inspector.is-resized { --panel-reserve: 153px; }
  .map-hud { right: 7px; bottom: 8px; }
  .map-bottom { inset: auto 7px 8px; }
  .drawing-bar { left: auto; right: 52px; transform: none; max-width: calc(100% - 52px); }
}

.placement-toolbar {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  height: var(--toolbar-height);
  border: 1px solid #617467;
  border-radius: 8px;
  background: #172b25f2;
  box-shadow: 0 3px 12px #10281f50;
}
.placement-toolbar button {
  flex: 0 0 auto;
  min-height: 32px;
  border-color: transparent;
  background: transparent;
  color: #ecf5e8;
  font-size: 13px;
  white-space: nowrap;
}
.placement-toolbar button:hover:not(:disabled), .placement-toolbar button[aria-expanded="true"] { background: #3b5547; }
.placement-toolbar button.is-active { color: #1c3927; background: var(--accent); }
.placement-toolbar button.is-active:hover:not(:disabled) { background: #cef4ac; }
.placement-toolbar .brush-picker { margin-left: -5px; padding-inline: 4px; }
.tool-separator { width: 1px; height: 20px; flex-shrink: 0; background: #64786c; margin: 0 3px; }
.guild-menu, .area-bubble, .rename-bubble {
  position: absolute;
  z-index: 9;
  padding: 5px;
  border: 1px solid #779087;
  border-radius: 8px;
  box-shadow: 0 5px 22px #14241a65;
}
.guild-menu {
  display: grid;
  gap: 2px;
  min-width: 168px;
  background: #f9fbf3;
  max-height: calc(100% - 113px);
  overflow-y: auto;
}
.guild-menu button {
  text-align: left;
  border: 0;
  background: transparent;
  font-size: 13px;
}
.guild-menu button:hover { background: #e8f0e1; }
#brush-menu { min-width: 0; }
#brush-menu button[aria-pressed="true"] { background: #dcecd2; }
.area-bubble {
  display: flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  max-width: calc(100% - 18px);
  color: #e9f4e8;
  background: #182d25f5;
}
.area-bubble span { padding: 0 5px; font-size: 12px; white-space: nowrap; }
.area-bubble button { padding: 4px 8px; min-height: 29px; font-size: 12px; white-space: nowrap; }
#save-area { background: var(--accent); border-color: var(--accent); }
.rename-bubble {
  display: grid;
  gap: 6px;
  width: min(218px, calc(100% - 18px));
  padding: 10px;
  background: #f9fbf3;
  color: #243b2e;
  font-size: 12px;
}
#city-guild-field { margin-top: 8px; }
#guild-list button { align-items: center; justify-content: flex-start; }
#guild-list small { margin-left: auto; }
.guild-swatch { display: inline-block; width: 11px; height: 11px; border: 1px solid #4b625d; border-radius: 3px; }
.inspector .stack-field select {
  width: 100%;
  min-height: 33px;
  border: 1px solid #cad7cb;
  border-radius: 6px;
  background: #fbfcf8;
  color: var(--ink);
  padding: 5px 7px;
  font: inherit;
}
.rename-bubble button, #guild-form button, #kingdom-form button { font-size: 12px; }
#guild-form, #kingdom-form { display: grid; gap: 8px; margin-top: 10px; }
#placement-guild-label, #placement-kingdom-label, #continuous-placement-label {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
#placement-guild, #placement-kingdom {
  max-width: min(170px, 32vw);
  min-height: 29px;
  border: 1px solid #617467;
  border-radius: 5px;
  background: #243d32;
  color: #ecf5e8;
  font: inherit;
}
.placement-tip {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  color: #edfaec;
  background: #182d25ee;
  border: 1px solid #82ae86;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 12px;
  max-width: min(300px, calc(100% - 18px));
}
.placement-tip.is-conflict { color: #ffe4e1; background: #562724f5; border-color: #fb817a; }
#terrain.is-conflict { cursor: not-allowed; }
@media (max-width: 720px) {
  .placement-toolbar button { padding-inline: 7px; }
}
