/* Feature geometry; the palette and glass materials come from style.css. */
.cc-factions {
  display: grid;
  grid-template-columns: minmax(230px, 290px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.cc-faction-sidebar {
  position: sticky;
  top: 20px;
  padding: 16px;
}
.cc-faction-list {
  display: grid;
  gap: 6px;
  max-height: 65vh;
  overflow: auto;
  margin-top: 16px;
}
.cc-faction {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  width: 100%;
  padding: 16px 12px;
  background: transparent;
  border-color: transparent;
}
.cc-faction span {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.cc-faction strong {
  overflow-wrap: anywhere;
}
.cc-faction small {
  color: var(--muted);
}
.cc-faction.active {
  background: var(--accent-soft);
  border-color: var(--line-strong);
}
.cc-faction-detail > .stats {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.cc-detail-body td small,
.cc-server-grid td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}
.cc-faction-detail {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
.cc-faction-detail > .tabs {
  flex-wrap: wrap;
}
.cc-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}
.cc-detail-head h2 {
  margin: 8px 0 0;
  font-size: 28px;
  overflow-wrap: anywhere;
}
.cc-detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  min-width: 0;
}
.cc-detail-body > div {
  min-width: 0;
}
.cc-detail-body .toolbar {
  flex-wrap: wrap;
}
.cc-detail-body .toolbar input[type="checkbox"],
.cc-detail-body input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
  height: 20px;
}
.cc-map {
  max-width: 680px;
  border-radius: 24px;
  border: 1px solid var(--line-strong);
}
.cc-target-map {
  max-width: 340px;
  cursor: crosshair;
  border-radius: 16px;
}
.cc-server-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 20px;
}
.cc-server-grid .panel {
  min-width: 0;
}
.cc-server-grid > .panel + .panel {
  margin-top: 0;
}
.cc-server-grid .table-wrap {
  max-height: 480px;
  overflow: auto;
}
.cc-trend {
  height: 110px;
  display: flex;
  align-items: end;
}
.cc-trend > div {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 100%;
  width: 100%;
}
.cc-trend-point {
  background: var(--accent);
  border-radius: 5px 5px 2px 2px;
  flex: 1;
  min-width: 3px;
  max-width: 36px;
}
.cc-server-grid ~ details {
  margin: 20px 0;
}
.cc-server-grid ~ details > summary {
  cursor: pointer;
  font-weight: 600;
}
.cc-server-grid ~ details[open] > summary {
  margin-bottom: 20px;
}
@media (max-width: 1100px) {
  .cc-server-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .cc-factions {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .cc-faction-sidebar {
    position: static;
  }
  .cc-faction-list {
    max-height: 230px;
  }
  .cc-detail-head {
    align-items: start;
  }
  .cc-detail-head h2 {
    font-size: 24px;
  }
  .cc-detail-body .toolbar > * {
    max-width: 100%;
  }
}
.coordinate-map {
  position: relative;
  width: 100%;
  min-height: 0;
  aspect-ratio: 1;
  align-self: start;
  background: var(--map-ocean) url("/live-map.png") center/100% 100% no-repeat;
  overflow: hidden;
}
.map-viewport {
  width: 100%;
  aspect-ratio: 1;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  cursor: grab;
  overscroll-behavior: contain;
  min-width: 0;
  box-shadow: var(--shadow);
}
.map-viewport:active {
  cursor: grabbing;
}
.map-viewport .coordinate-map {
  max-width: none;
  user-select: none;
}
.map-info {
  position: absolute;
  z-index: 8;
  width: 232px;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 16px;
  border: 1px solid var(--highlight);
  border-radius: 16px;
  overflow-wrap: anywhere;
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}
.map-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.map-card-close {
  min-width: 28px;
  min-height: 28px;
  padding: 2px;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.map-info > .primary {
  width: 100%;
}
.map-info strong {
  font-size: 1rem;
}
.map-info p {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 8px 0 13px;
}
button.map-marker,
button.map-marker:hover,
button.map-marker:active,
button.map-marker:focus-visible {
  transform: translate(-50%, -50%);
}
.map-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  min-height: 34px;
  min-width: 34px;
  padding: 4px;
  background: var(--accent);
  color: var(--on-accent);
  border: 2px solid var(--map-text);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 2px 9px rgba(5, 23, 45, 0.35);
  z-index: 1;
  transition:
    background-color 180ms,
    border-color 180ms,
    box-shadow 180ms;
}
.map-marker:hover,
.map-marker:focus-visible,
.map-marker.selected {
  z-index: 2;
  background: var(--accent-hover);
  outline: 3px solid var(--blue-line);
  outline-offset: 3px;
}
.map-marker.selected:before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid var(--map-text);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.7;
}
.operations-web-tabs {
  margin-bottom: 20px;
  overflow: auto;
}
.operations-web-content {
  min-height: 280px;
}
.operations-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.operations-live-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.operations-live-grid > .panel:last-child {
  grid-column: 1/-1;
}
.operations-live-grid > .panel + .panel {
  margin-top: 0;
}
.operations-live-grid .panel {
  min-width: 0;
  overflow: hidden;
}
.operations-live-grid .table-wrap {
  max-height: 360px;
  overflow: auto;
}
.operations-live-grid table {
  min-width: 570px;
}
.operations-factions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.operations-factions > .panel + .panel {
  margin-top: 0;
}
.operations-faction-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.operations-factions .actions {
  margin-top: 10px;
}
.operations-factions .list-row {
  align-items: flex-start;
}
@media (prefers-reduced-motion: no-preference) {
  [data-motion="full"] .map-marker.selected:before {
    animation: map-pulse 1.8s ease-out infinite;
  }
}
@keyframes map-pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}
@media (max-width: 1500px) {
  .operations-live-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1250px) {
  .operations-factions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 650px) {
  .operations-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .operations-summary > :last-child {
    grid-column: 1/-1;
  }
  .operations-factions {
    grid-template-columns: 1fr;
  }
  .operations-live-grid > .panel:last-child {
    grid-column: auto;
  }
}
