#controls #open-forces:not(:disabled) {
  background: var(--accent);
  color: #f8f5eb;
  font-weight: 650;
}
#controls #open-forces:not(:disabled):hover { background: #28675a; }

#forces-dialog {
  width: min(680px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  color: inherit;
  box-shadow: 0 24px 72px #0c292b68;
}
#forces-dialog::backdrop { background: #132f2ca3; }
.forces-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 24px 19px;
  background: var(--accent);
  color: #fff9ed;
}
.forces-header h2 { margin: 4px 0 0; font-size: clamp(25px, 5vw, 35px); line-height: 1.12; }
#forces-era { margin: 0; color: #c8e1d3; font-size: 13px; font-weight: 650; }
.forces-close {
  padding: 0;
  width: 44px;
  height: 44px;
  min-height: 44px;
  border-color: #a7c4b7;
  color: #fff9ed;
  font-size: 25px;
  line-height: 1;
}
.forces-close:hover:not(:disabled) { background: #326d60; }
.forces-content { display: grid; gap: 16px; padding: 20px 24px 24px; }
.forces-content h3 { margin: 0 0 10px; font-size: 16px; }
.forces-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.forces-totals div, .forces-card, .forces-war { border: 1px solid var(--line); border-radius: 11px; }
.forces-totals div { padding: 10px 12px; background: #eaf0e3; }
.forces-totals dt { color: #47685f; font-size: 12px; }
.forces-totals dd {
  margin: 2px 0 0;
  font-size: clamp(16px, 4vw, 23px);
  font-weight: 750;
  line-height: 1.2;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.forces-totals div:nth-child(2) dd { color: #1e594c; }
.forces-totals div:nth-child(3) dd { color: #8d4a39; }
#forces-empty { margin: 9px 0 0; color: #47685f; font-size: 13px; }
.forces-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; }
.forces-card { min-width: 0; padding: 13px; background: #fffdf6; }
#forces-search { display: flex; gap: 6px; }
#forces-query {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf6;
  color: inherit;
  font: inherit;
  font-size: 16px;
}
#forces-query::placeholder { font-size: 13px; }
#forces-search button, .forces-follow {
  min-height: 44px;
  border-color: var(--line);
  background: #eaf0e3;
  color: var(--accent);
  font-weight: 650;
  white-space: nowrap;
}
#forces-query:focus-visible { outline: 2px solid #bf714a; outline-offset: 2px; }
#forces-message { margin: 8px 0 0; color: #47685f; font-size: 13px; }
#forces-message:empty, #forces-results:empty { display: none; }
#forces-results, #forces-commanders { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
#forces-results { margin-top: 8px; }
#forces-results li {
  min-width: 0;
  background: #f4f2e7;
  border: 1px solid #dddccc;
  border-radius: 8px;
  padding: 10px;
  overflow-wrap: anywhere;
}
.forces-meta { font-size: 12px; color: #47685f; margin: 5px 0 0; }
.forces-follow { margin-top: 8px; }
#forces-commanders li { display: flex; gap: 8px; justify-content: space-between; min-width: 0; font-size: 13px; }
#forces-commanders li + li { border-top: 1px solid #dce4db; padding-top: 6px; }
#forces-commanders span { color: #47685f; flex-shrink: 0; }
#forces-commanders strong { overflow-wrap: anywhere; text-align: right; }
.forces-war {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 11px 13px;
  background: #f3e7d7;
  border-color: #dbc8b4;
}
.forces-war h3 { margin: 0; color: #783d2e; }
.forces-war p { margin: 3px 0 0; color: #6b5549; font-size: 12px; }
#forces-countdown { font: 700 16px ui-monospace, monospace; color: #783d2e; }
@media (max-width: 560px) {
  .forces-header { padding-inline: 15px; }
  .forces-content { padding: 14px 15px 16px; gap: 12px; }
  .forces-grid { grid-template-columns: minmax(0, 1fr); }
  .forces-totals div { padding: 8px; }
}
